diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2019-01-25 16:59:18 -0800 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2019-01-31 11:42:14 -0800 |
| commit | 1a1dbef992442682413f6103e36440a26bc2dad7 (patch) | |
| tree | beb902633b3019bba71578831523618c4b5b7dba /shared-module/displayio/Display.c | |
| parent | 590e0291989c8df150b9b8aff960049903b56ac2 (diff) | |
Hook up the terminal based on the first display.
Diffstat (limited to 'shared-module/displayio/Display.c')
| -rw-r--r-- | shared-module/displayio/Display.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/shared-module/displayio/Display.c b/shared-module/displayio/Display.c index 7946111b7..fd082c19d 100644 --- a/shared-module/displayio/Display.c +++ b/shared-module/displayio/Display.c @@ -30,6 +30,8 @@ #include "shared-bindings/displayio/FourWire.h" #include "shared-bindings/displayio/ParallelBus.h" #include "shared-bindings/time/__init__.h" +#include "shared-module/displayio/__init__.h" +#include "supervisor/shared/display.h" #include <stdint.h> @@ -47,6 +49,7 @@ void common_hal_displayio_display_construct(displayio_display_obj_t* self, self->set_column_command = set_column_command; self->set_row_command = set_row_command; self->write_ram_command = write_ram_command; + self->refresh = false; self->current_group = NULL; self->colstart = colstart; self->rowstart = rowstart; @@ -86,9 +89,19 @@ void common_hal_displayio_display_construct(displayio_display_obj_t* self, i += 2 + data_size; } self->end_transaction(self->bus); + + supervisor_start_terminal(width, height); + + // Set the group after initialization otherwise we may send pixels while we delay in + // initialization. + self->refresh = true; + self->current_group = &circuitpython_splash; } void common_hal_displayio_display_show(displayio_display_obj_t* self, displayio_group_t* root_group) { + if (root_group == NULL) { + root_group = &circuitpython_splash; + } self->current_group = root_group; common_hal_displayio_display_refresh_soon(self); } |
