diff options
| author | Jeff Epler <jepler@gmail.com> | 2020-08-06 16:03:31 -0500 |
|---|---|---|
| committer | Jeff Epler <jepler@gmail.com> | 2020-08-12 07:32:18 -0500 |
| commit | c1400bae9bbdd55f650ddfe24edf6778f08c35b8 (patch) | |
| tree | e8f5695e92e8b6b174bc1281910ae14dcea0b93a /supervisor | |
| parent | 9c4f644641400c7b7eea37ace73782bc1cec2691 (diff) | |
sharpmemory: Implement support for Sharp Memory Displays in framebufferio
Diffstat (limited to 'supervisor')
| -rw-r--r-- | supervisor/shared/display.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/supervisor/shared/display.c b/supervisor/shared/display.c index 9c074209b..a86ef6396 100644 --- a/supervisor/shared/display.c +++ b/supervisor/shared/display.c @@ -38,6 +38,11 @@ #include "shared-module/displayio/__init__.h" #endif +#if CIRCUITPY_SHARPDISPLAY +#include "shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h" +#include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h" +#endif + extern size_t blinka_bitmap_data[]; extern displayio_bitmap_t blinka_bitmap; extern displayio_group_t circuitpython_splash; @@ -116,15 +121,21 @@ void supervisor_display_move_memory(void) { grid->inline_tiles = false; } MP_STATE_VM(terminal_tilegrid_tiles) = NULL; - #if CIRCUITPY_RGBMATRIX for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { - if (displays[i].rgbmatrix.base.type == &rgbmatrix_RGBMatrix_type) { - rgbmatrix_rgbmatrix_obj_t * pm = &displays[i].rgbmatrix; + #if CIRCUITPY_RGBMATRIX + if (displays[i].rgbmatrix.base.type == &rgbmatrix_RGBMatrix_type) { + rgbmatrix_rgbmatrix_obj_t * pm = &displays[i].rgbmatrix; common_hal_rgbmatrix_rgbmatrix_reconstruct(pm, NULL); - } + } + #endif + #if CIRCUITPY_SHARPDISPLAY + if (displays[i].bus_base.type == &sharpdisplay_framebuffer_type) { + sharpdisplay_framebuffer_obj_t * sharp = &displays[i].sharpdisplay; + common_hal_sharpdisplay_framebuffer_reconstruct(sharp); + } + #endif } #endif - #endif } size_t blinka_bitmap_data[32] = { |
