File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,6 +146,9 @@ static void common_hal_displayio_release_displays_impl(bool keep_primary) {
146146 displays [i ].display_base .type = & mp_type_NoneType ;
147147 }
148148 for (uint8_t i = 0 ; i < CIRCUITPY_DISPLAY_LIMIT ; i ++ ) {
149+ if (i == primary_display_number ) {
150+ continue ;
151+ }
149152 mp_const_obj_t bus_type = display_buses [i ].bus_base .type ;
150153 if (bus_type == NULL || bus_type == & mp_type_NoneType ) {
151154 continue ;
@@ -193,16 +196,19 @@ static void common_hal_displayio_release_displays_impl(bool keep_primary) {
193196 display_buses [i ].bus_base .type = & mp_type_NoneType ;
194197 }
195198
196- supervisor_stop_terminal ();
199+ if (!keep_primary ) {
200+ supervisor_stop_terminal ();
201+ }
197202}
198203
199204void common_hal_displayio_release_displays (void ) {
200205 common_hal_displayio_release_displays_impl (false);
201206}
202207
203208void reset_displays (void ) {
204- // In CircuitPython 10, release secondary displays before doing anything else:
205- // common_hal_displayio_release_displays_impl(true);
209+ // TODO: In CircuitPython 11, uncomment the call.
210+ // Release secondary displays.
211+ // common_hal_displayio_release_displays_impl(/*keep_primary*/ true);
206212
207213 // The SPI buses used by FourWires may be allocated on the heap so we need to move them inline.
208214 for (uint8_t i = 0 ; i < CIRCUITPY_DISPLAY_LIMIT ; i ++ ) {
You can’t perform that action at this time.
0 commit comments