Display driver interface.
More...
Display driver interface.
Updates are row based: the driver pulls the rows to send from a callback and reports completion through another one.
if (s_y >= s_y_end) {
return false;
}
row->
data = framebuffer_get_line(fb, s_y++);
return true;
}
uint16_t address
Row index, from 0 at the top.
Definition display.h:38
uint8_t * data
Row pixels in framebuffer format; must stay valid until the update completes.
Definition display.h:40
Row to send to the display.
Definition display.h:36
void display_update(NextRowCallback nrcb, UpdateCompleteCallback uccb)
Start a display update.
◆ DisplayRow
Row to send to the display.
| Data Fields |
|
uint16_t |
address |
Row index, from 0 at the top. |
|
uint8_t * |
data |
Row pixels in framebuffer format; must stay valid until the update completes. |
◆ NextRowCallback
Provide the next row of an update.
- Parameters
-
| [out] | row | Next row to send. |
- Returns
- True if
row was filled, false when there are no more rows.
◆ UpdateCompleteCallback
| typedef void(* UpdateCompleteCallback) (void) |
Notification that an update has completed.
◆ display_clear()
| void display_clear |
( |
void |
| ) |
|
Clear the display, where supported.
◆ display_init()
| void display_init |
( |
void |
| ) |
|
◆ display_set_enabled()
| void display_set_enabled |
( |
bool |
enabled | ) |
|
Turn the display on or off.
- Parameters
-
| enabled | True to turn it on. |
◆ display_set_rotated()
| void display_set_rotated |
( |
bool |
rotated | ) |
|
Set whether the image is rotated by 180 degrees.
- Parameters
-
| rotated | True to rotate by 180 degrees. |
◆ display_update()
Start a display update.
Pulls rows from nrcb until it returns false, sends them, and calls uccb once done. Must not be called while an update is in progress.
- Parameters
-
| nrcb | Provides the rows to update. |
| uccb | Called when the update has completed. |
◆ display_update_boot_frame()
| void display_update_boot_frame |
( |
uint8_t * |
framebuffer | ) |
|
Show a boot animation frame.
Lets the boot animation draw before the compositor is initialized.
- Parameters
-
| framebuffer | Full frame of DISPLAY_FRAMEBUFFER_BYTES bytes. |
◆ display_update_in_progress()
| bool display_update_in_progress |
( |
void |
| ) |
|
Check whether an update is in progress.
- Returns
- True between display_update() and its completion.