File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -89,8 +89,6 @@ mp_obj_t common_hal_board_create_spi(void) {
89
89
const mcu_pin_obj_t * mosi = MP_OBJ_TO_PTR (DEFAULT_SPI_BUS_MOSI );
90
90
const mcu_pin_obj_t * miso = MP_OBJ_TO_PTR (DEFAULT_SPI_BUS_MISO );
91
91
common_hal_busio_spi_construct (self , clock , mosi , miso );
92
- // make sure lock is not held initially
93
- common_hal_busio_spi_unlock (self );
94
92
spi_singleton = (mp_obj_t )self ;
95
93
return spi_singleton ;
96
94
}
@@ -153,6 +151,7 @@ void reset_board_busses(void) {
153
151
#endif
154
152
#if BOARD_SPI
155
153
bool display_using_spi = false;
154
+ busio_spi_obj_t * self = & spi_obj ;
156
155
#if CIRCUITPY_DISPLAYIO
157
156
for (uint8_t i = 0 ; i < CIRCUITPY_DISPLAY_LIMIT ; i ++ ) {
158
157
mp_const_obj_t bus_type = displays [i ].bus_base .type ;
@@ -169,6 +168,8 @@ void reset_board_busses(void) {
169
168
}
170
169
#endif
171
170
if (!display_using_spi ) {
171
+ // make sure lock is not held over a soft reset
172
+ common_hal_busio_spi_unlock (self );
172
173
spi_singleton = NULL ;
173
174
}
174
175
#endif
You can’t perform that action at this time.
0 commit comments