diff --git a/ports/stm32f4/common-hal/busio/SPI.c b/ports/stm32f4/common-hal/busio/SPI.c index f98d29054..b5517f470 100644 --- a/ports/stm32f4/common-hal/busio/SPI.c +++ b/ports/stm32f4/common-hal/busio/SPI.c @@ -38,6 +38,8 @@ #define MAX_SPI 6 //TODO; replace this as part of periph cleanup #define ALL_CLOCKS 0xFF + +//arrays use 0 based numbering: SPI1 is stored at index 0 STATIC bool reserved_spi[MAX_SPI]; STATIC bool never_reset_spi[MAX_SPI]; @@ -360,4 +362,4 @@ STATIC void spi_clock_disable(uint8_t mask) { #ifdef SPI6 if (mask & 1<<5) __HAL_RCC_SPI6_CLK_DISABLE(); #endif -} \ No newline at end of file +}