diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index e52ec5b9e3..5afcba35ec 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -107,7 +107,7 @@ void common_hal_displayio_release_displays(void) { common_hal_displayio_i2cdisplay_deinit(&displays[i].i2cdisplay_bus); } else if (bus_type == &displayio_parallelbus_type) { common_hal_displayio_parallelbus_deinit(&displays[i].parallel_bus); -#if CIRCUITPY_FRAMEBUFFERIO +#if CIRCUITPY_RGBMATRIX } else if (bus_type == &rgbmatrix_RGBMatrix_type) { common_hal_rgbmatrix_rgbmatrix_deinit(&displays[i].rgbmatrix); #endif @@ -222,7 +222,7 @@ void displayio_gc_collect(void) { } #endif #if CIRCUITPY_SHARPDISPLAY - if (displays[i].rgbmatrix.base.type == &sharpdisplay_framebuffer_type) { + if (displays[i].bus_base.type == &sharpdisplay_framebuffer_type) { common_hal_sharpdisplay_framebuffer_collect_ptrs(&displays[i].sharpdisplay); } #endif diff --git a/supervisor/shared/display.c b/supervisor/shared/display.c index a86ef6396f..08dd71404b 100644 --- a/supervisor/shared/display.c +++ b/supervisor/shared/display.c @@ -39,6 +39,7 @@ #endif #if CIRCUITPY_SHARPDISPLAY +#include "shared-module/displayio/__init__.h" #include "shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h" #include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h" #endif