|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
Direct framebuffer drawing for advanced plugins. More...
Functions | |
| uint16_t | host_display_width (void) |
| Display width in pixels. | |
| uint16_t | host_display_height (void) |
| Display height in pixels. | |
| int | host_display_clear (void) |
| Clear the framebuffer to background. | |
| int | host_display_draw_pixel (int16_t x, int16_t y, uint16_t color) |
| Set a single pixel. | |
| int | host_display_draw_line (int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color) |
| Draw a line between two points. | |
| int | host_display_draw_rect (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color) |
| Draw a rectangle outline. | |
| int | host_display_fill_rect (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color) |
| Draw a filled rectangle. | |
| int | host_display_draw_text (int16_t x, int16_t y, const char *text, uint8_t size, uint16_t color) |
| Draw text using the default GFX font. | |
| int | host_display_flush (uint8_t refresh_mode) |
| Push the framebuffer to the panel using the given refresh mode. | |
| bool | host_display_is_busy (void) |
| True while the panel is processing a previous refresh. | |
Direct framebuffer drawing for advanced plugins.
Opt-in via the manifest capability "display_lowlevel". Bypasses the view system entirely; call host_display_flush to push pixels to the panel.
| int host_display_clear | ( | void | ) |
Clear the framebuffer to background.
Definition at line 49 of file host_api_display.cpp.
References HOST_ERR_GENERIC, HOST_ERR_NO_CAPABILITY, and HOST_OK.
Referenced by cdc::plugin_manager::w_host_display_clear().
| int host_display_draw_line | ( | int16_t | x0, |
| int16_t | y0, | ||
| int16_t | x1, | ||
| int16_t | y1, | ||
| uint16_t | color ) |
Draw a line between two points.
Definition at line 67 of file host_api_display.cpp.
References HOST_ERR_GENERIC, HOST_ERR_NO_CAPABILITY, and HOST_OK.
Referenced by cdc::plugin_manager::w_host_display_draw_line().
| int host_display_draw_pixel | ( | int16_t | x, |
| int16_t | y, | ||
| uint16_t | color ) |
Set a single pixel.
Definition at line 58 of file host_api_display.cpp.
References HOST_ERR_GENERIC, HOST_ERR_NO_CAPABILITY, and HOST_OK.
Referenced by cdc::plugin_manager::w_host_display_draw_pixel().
| int host_display_draw_rect | ( | int16_t | x, |
| int16_t | y, | ||
| int16_t | w, | ||
| int16_t | h, | ||
| uint16_t | color ) |
Draw a rectangle outline.
Definition at line 76 of file host_api_display.cpp.
References HOST_ERR_GENERIC, HOST_ERR_NO_CAPABILITY, and HOST_OK.
Referenced by cdc::plugin_manager::w_host_display_draw_rect().
| int host_display_draw_text | ( | int16_t | x, |
| int16_t | y, | ||
| const char * | text, | ||
| uint8_t | size, | ||
| uint16_t | color ) |
Draw text using the default GFX font.
Definition at line 94 of file host_api_display.cpp.
References HOST_ERR_GENERIC, HOST_ERR_INVALID_ARG, HOST_ERR_NO_CAPABILITY, HOST_OK, cdc::ui::render::printText(), and cdc::plugin_manager::toDisplay().
Referenced by cdc::plugin_manager::w_host_display_draw_text().
| int host_display_fill_rect | ( | int16_t | x, |
| int16_t | y, | ||
| int16_t | w, | ||
| int16_t | h, | ||
| uint16_t | color ) |
Draw a filled rectangle.
Definition at line 85 of file host_api_display.cpp.
References HOST_ERR_GENERIC, HOST_ERR_NO_CAPABILITY, and HOST_OK.
Referenced by cdc::plugin_manager::w_host_display_fill_rect().
| int host_display_flush | ( | uint8_t | refresh_mode | ) |
Push the framebuffer to the panel using the given refresh mode.
Definition at line 109 of file host_api_display.cpp.
References cdc::hal::FULL, HOST_ERR_GENERIC, HOST_ERR_NO_CAPABILITY, HOST_OK, and cdc::hal::PARTIAL.
Referenced by cdc::plugin_manager::w_host_display_flush().
| uint16_t host_display_height | ( | void | ) |
Display height in pixels.
Definition at line 43 of file host_api_display.cpp.
Referenced by cdc::plugin_manager::w_host_display_height().
| bool host_display_is_busy | ( | void | ) |
True while the panel is processing a previous refresh.
Definition at line 118 of file host_api_display.cpp.
Referenced by cdc::plugin_manager::w_host_display_is_busy().
| uint16_t host_display_width | ( | void | ) |
Display width in pixels.
Definition at line 37 of file host_api_display.cpp.
Referenced by cdc::plugin_manager::w_host_display_width().