Skip to content

Commit bacc184

Browse files
Correct SPI state machine for disable()
1 parent 7ab6adc commit bacc184

File tree

6 files changed

+3
-3
lines changed

6 files changed

+3
-3
lines changed

system/STM32L4xx/Lib/libstm32l432.a

52 Bytes
Binary file not shown.

system/STM32L4xx/Lib/libstm32l433.a

56 Bytes
Binary file not shown.

system/STM32L4xx/Lib/libstm32l476.a

56 Bytes
Binary file not shown.

system/STM32L4xx/Lib/libstm32l496.a

48 Bytes
Binary file not shown.

system/STM32L4xx/Source/stm32l4_sai.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ bool stm32l4_sai_disable(stm32l4_sai_t *sai)
702702
stm32l4_gpio_pin_configure(sai->pins.mck, (GPIO_PUPD_NONE | GPIO_MODE_ANALOG));
703703
}
704704

705-
sai->state = SAI_STATE_NONE;
705+
sai->state = SAI_STATE_INIT;
706706

707707
return true;
708708
}

system/STM32L4xx/Source/stm32l4_spi.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -944,8 +944,6 @@ bool stm32l4_spi_disable(stm32l4_spi_t *spi)
944944
return false;
945945
}
946946

947-
spi->state = SPI_STATE_NONE;
948-
949947
stm32l4_gpio_pin_configure(spi->pins.mosi, (GPIO_PUPD_NONE | GPIO_MODE_ANALOG));
950948

951949
if (spi->pins.miso != GPIO_PIN_NONE)
@@ -960,6 +958,8 @@ bool stm32l4_spi_disable(stm32l4_spi_t *spi)
960958
stm32l4_gpio_pin_configure(spi->pins.ss, (GPIO_PUPD_NONE | GPIO_MODE_ANALOG));
961959
}
962960

961+
spi->state = SPI_STATE_INIT;
962+
963963
return true;
964964
}
965965

0 commit comments

Comments
 (0)