File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939#include "shared-module/displayio/__init__.h"
4040#endif
4141
42+ #if CIRCUITPY_SHARPDISPLAY
43+ #include "shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h"
44+ #include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h"
45+ #endif
46+
4247#if BOARD_I2C
4348// Statically allocate the I2C object so it can live past the end of the heap and into the next VM.
4449// That way it can be used by built-in I2CDisplay displays and be accessible through board.I2C().
@@ -148,12 +153,19 @@ void reset_board_busses(void) {
148153 bool display_using_spi = false;
149154 #if CIRCUITPY_DISPLAYIO
150155 for (uint8_t i = 0 ; i < CIRCUITPY_DISPLAY_LIMIT ; i ++ ) {
151- if (displays [i ].fourwire_bus .bus == spi_singleton ) {
156+ mp_const_obj_t bus_type = displays [i ].bus_base .type ;
157+ if (bus_type == & displayio_fourwire_type && displays [i ].fourwire_bus .bus == spi_singleton ) {
152158 display_using_spi = true;
153159 break ;
154160 }
155- }
161+ #if CIRCUITPY_SHARPDISPLAY
162+ if (displays [i ].bus_base .type == & sharpdisplay_framebuffer_type && displays [i ].sharpdisplay .bus == spi_singleton ) {
163+ display_using_spi = true;
164+ break ;
165+ }
166+ #endif
156167 #endif
168+ }
157169 if (!display_using_spi ) {
158170 spi_singleton = NULL ;
159171 }
You can’t perform that action at this time.
0 commit comments