Skip to content

Commit 8d27533

Browse files
committed
Make sure SPI lock is free initially
1 parent 6357093 commit 8d27533

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

shared-module/board/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ mp_obj_t common_hal_board_create_spi(void) {
8989
const mcu_pin_obj_t* mosi = MP_OBJ_TO_PTR(DEFAULT_SPI_BUS_MOSI);
9090
const mcu_pin_obj_t* miso = MP_OBJ_TO_PTR(DEFAULT_SPI_BUS_MISO);
9191
common_hal_busio_spi_construct(self, clock, mosi, miso);
92+
// make sure lock is not held initially
93+
common_hal_busio_spi_unlock(self);
9294
spi_singleton = (mp_obj_t)self;
9395
return spi_singleton;
9496
}

0 commit comments

Comments
 (0)