File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 39
39
#include "shared-module/displayio/__init__.h"
40
40
#endif
41
41
42
+ #if CIRCUITPY_SHARPDISPLAY
43
+ #include "shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h"
44
+ #include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h"
45
+ #endif
46
+
42
47
#if BOARD_I2C
43
48
// Statically allocate the I2C object so it can live past the end of the heap and into the next VM.
44
49
// 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) {
148
153
bool display_using_spi = false;
149
154
#if CIRCUITPY_DISPLAYIO
150
155
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 ) {
152
158
display_using_spi = true;
153
159
break ;
154
160
}
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
156
167
#endif
168
+ }
157
169
if (!display_using_spi ) {
158
170
spi_singleton = NULL ;
159
171
}
You can’t perform that action at this time.
0 commit comments