Fix build errors when SHARPDISPLAY && !RGBMATRIX

This commit is contained in:
Jeff Epler 2020-08-12 07:39:12 -05:00
parent 65f91f69cc
commit 759ded9c38
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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