From 29a2bac4691dae81a613af31e5e99660e61edc3d Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Wed, 6 Jul 2022 06:41:35 +1000 Subject: Fixup SPI. (#17534) --- platforms/chibios/drivers/spi_master.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'platforms/chibios/drivers') diff --git a/platforms/chibios/drivers/spi_master.c b/platforms/chibios/drivers/spi_master.c index f9974d9f6b..223d8a403e 100644 --- a/platforms/chibios/drivers/spi_master.c +++ b/platforms/chibios/drivers/spi_master.c @@ -46,6 +46,9 @@ __attribute__((weak)) void spi_init(void) { palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_ALTERNATE(SPI_MOSI_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST); palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_ALTERNATE(SPI_MISO_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST); #endif + spiUnselect(&SPI_DRIVER); + spiStop(&SPI_DRIVER); + currentSlavePin = NO_PIN; } } -- cgit v1.2.3