summaryrefslogtreecommitdiff
path: root/supervisor
diff options
context:
space:
mode:
authorScott Shawcroft <scott@adafruit.com>2020-08-12 16:53:09 -0700
committerGitHub <noreply@github.com>2020-08-12 16:53:09 -0700
commit7ffa2a103cd0f00a4626b5cbae8b8d1c048342b3 (patch)
treebcbd0f9699ee59d02d4df9685e9592dcfbdb0052 /supervisor
parent3197c579e0acddf7aa962fe805cefd75b584d267 (diff)
parent195c0ea986fd44f3b56cc57f23e8259df1e18202 (diff)
Merge pull request #3269 from jepler/sharpdisplay-v2
Sharp Memory Display displayio support (v2)
Diffstat (limited to 'supervisor')
-rw-r--r--supervisor/shared/display.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/supervisor/shared/display.c b/supervisor/shared/display.c
index 9c074209b..08dd71404 100644
--- a/supervisor/shared/display.c
+++ b/supervisor/shared/display.c
@@ -38,6 +38,12 @@
#include "shared-module/displayio/__init__.h"
#endif
+#if CIRCUITPY_SHARPDISPLAY
+#include "shared-module/displayio/__init__.h"
+#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 +122,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] = {