summaryrefslogtreecommitdiff
path: root/shared-module/displayio
diff options
context:
space:
mode:
authorMark <56205165+gamblor21@users.noreply.github.com>2020-10-16 15:52:45 -0500
committerGitHub <noreply@github.com>2020-10-16 15:52:45 -0500
commit8e6d3e5b91f4c7cdb0dc4743a9a9937708daa624 (patch)
tree6d541d14808bd8456b17303fb654a73300f1adc5 /shared-module/displayio
parent645382d51d37a40312118eebc11da75639913fce (diff)
parentf0b37313c5adf2ad940d7279aa49620d36d7292d (diff)
Merge branch 'main' into recv_into_size_check6.1.0-alpha.0
Diffstat (limited to 'shared-module/displayio')
-rw-r--r--shared-module/displayio/Display.c8
-rw-r--r--shared-module/displayio/EPaperDisplay.c2
-rw-r--r--shared-module/displayio/display_core.c5
3 files changed, 8 insertions, 7 deletions
diff --git a/shared-module/displayio/Display.c b/shared-module/displayio/Display.c
index bb7e40f41..7c8c9280b 100644
--- a/shared-module/displayio/Display.c
+++ b/shared-module/displayio/Display.c
@@ -107,8 +107,6 @@ void common_hal_displayio_display_construct(displayio_display_obj_t* self,
i += 2 + data_size;
}
- supervisor_start_terminal(width, height);
-
// Always set the backlight type in case we're reusing memory.
self->backlight_inout.base.type = &mp_type_NoneType;
if (backlight_pin != NULL && common_hal_mcu_pin_is_free(backlight_pin)) {
@@ -349,8 +347,10 @@ void common_hal_displayio_display_set_rotation(displayio_display_obj_t* self, in
self->core.height = tmp;
}
displayio_display_core_set_rotation(&self->core, rotation);
- supervisor_stop_terminal();
- supervisor_start_terminal(self->core.width, self->core.height);
+ if (self == &displays[0].display) {
+ supervisor_stop_terminal();
+ supervisor_start_terminal(self->core.width, self->core.height);
+ }
if (self->core.current_group != NULL) {
displayio_group_update_transform(self->core.current_group, &self->core.transform);
}
diff --git a/shared-module/displayio/EPaperDisplay.c b/shared-module/displayio/EPaperDisplay.c
index 5b055e62e..46c7ea82e 100644
--- a/shared-module/displayio/EPaperDisplay.c
+++ b/shared-module/displayio/EPaperDisplay.c
@@ -90,8 +90,6 @@ void common_hal_displayio_epaperdisplay_construct(displayio_epaperdisplay_obj_t*
// TODO: Clear
}
- supervisor_start_terminal(width, height);
-
// Set the group after initialization otherwise we may send pixels while we delay in
// initialization.
common_hal_displayio_epaperdisplay_show(self, &circuitpython_splash);
diff --git a/shared-module/displayio/display_core.c b/shared-module/displayio/display_core.c
index 60a8ef213..411f9f373 100644
--- a/shared-module/displayio/display_core.c
+++ b/shared-module/displayio/display_core.c
@@ -85,7 +85,10 @@ void displayio_display_core_construct(displayio_display_core_t* self,
self->bus = bus;
- supervisor_start_terminal(width, height);
+ // (offsetof core is equal in all display types)
+ if (self == &displays[0].display.core) {
+ supervisor_start_terminal(width, height);
+ }
self->width = width;
self->height = height;