PebbleOS
Loading...
Searching...
No Matches
Modules | Data Structures | Typedefs | Functions
Display

Display driver interface. More...

Modules

 SF32LB JDI display
 Display implementation for JDI memory-in-pixel panels driven by the SF32LB LCD controller.
 
 Sharp LS013B7DH01
 Display implementation for the Sharp LS013B7DH01 memory LCD.
 

Data Structures

struct  DisplayRow
 Row to send to the display. More...
 

Typedefs

typedef bool(* NextRowCallback) (DisplayRow *row)
 Provide the next row of an update.
 
typedef void(* UpdateCompleteCallback) (void)
 Notification that an update has completed.
 

Functions

void display_update_boot_frame (uint8_t *framebuffer)
 Show a boot animation frame.
 
void display_init (void)
 Initialize the display.
 
void display_clear (void)
 Clear the display, where supported.
 
void display_set_enabled (bool enabled)
 Turn the display on or off.
 
void display_set_rotated (bool rotated)
 Set whether the image is rotated by 180 degrees.
 
void display_update (NextRowCallback nrcb, UpdateCompleteCallback uccb)
 Start a display update.
 
bool display_update_in_progress (void)
 Check whether an update is in progress.
 

Detailed Description

Display driver interface.

Updates are row based: the driver pulls the rows to send from a callback and reports completion through another one.

static bool prv_next_row(DisplayRow *row) {
if (s_y >= s_y_end) {
return false;
}
row->address = s_y;
row->data = framebuffer_get_line(fb, s_y++);
return true;
}
display_update(prv_next_row, prv_update_done);
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.

Data Structure Documentation

◆ DisplayRow

struct 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.

Typedef Documentation

◆ NextRowCallback

typedef bool(* NextRowCallback) (DisplayRow *row)

Provide the next row of an update.

Parameters
[out]rowNext 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.

Function Documentation

◆ display_clear()

void display_clear ( void  )

Clear the display, where supported.

◆ display_init()

void display_init ( void  )

Initialize the display.

◆ display_set_enabled()

void display_set_enabled ( bool  enabled)

Turn the display on or off.

Parameters
enabledTrue to turn it on.

◆ display_set_rotated()

void display_set_rotated ( bool  rotated)

Set whether the image is rotated by 180 degrees.

Parameters
rotatedTrue to rotate by 180 degrees.

◆ display_update()

void display_update ( NextRowCallback  nrcb,
UpdateCompleteCallback  uccb 
)

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
nrcbProvides the rows to update.
uccbCalled 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
framebufferFull 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.