diff options
author | QMK Bot <[email protected]> | 2025-07-06 06:21:29 +0000 |
---|---|---|
committer | QMK Bot <[email protected]> | 2025-07-06 06:21:29 +0000 |
commit | 67c97da6544efbbf0cb3f4986feee2e3ca2f1355 (patch) | |
tree | 3bbdd5d3ff8532ce3aa18040885de9ef56a71cc9 | |
parent | 0b33318a249eda0b0163e67a79db4a75bbc7fffd (diff) | |
parent | 90b5c170347e7a46a8f56628a9830ea5a719a326 (diff) | |
download | qmk_firmware-67c97da6544efbbf0cb3f4986feee2e3ca2f1355.tar.gz qmk_firmware-67c97da6544efbbf0cb3f4986feee2e3ca2f1355.zip |
Merge remote-tracking branch 'origin/master' into develop
-rw-r--r-- | platforms/chibios/drivers/spi_master.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/platforms/chibios/drivers/spi_master.c b/platforms/chibios/drivers/spi_master.c index f5e48edfda..84d027bf49 100644 --- a/platforms/chibios/drivers/spi_master.c +++ b/platforms/chibios/drivers/spi_master.c @@ -130,10 +130,16 @@ bool spi_start_extended(spi_start_config_t *start_config) { #endif // (SPI_USE_MUTUAL_EXCLUSION == TRUE) if (spiStarted) { +#if (SPI_USE_MUTUAL_EXCLUSION == TRUE) + spiReleaseBus(&SPI_DRIVER); +#endif // (SPI_USE_MUTUAL_EXCLUSION == TRUE) return false; } #if SPI_SELECT_MODE != SPI_SELECT_MODE_NONE if (start_config->slave_pin == NO_PIN) { +# if (SPI_USE_MUTUAL_EXCLUSION == TRUE) + spiReleaseBus(&SPI_DRIVER); +# endif // (SPI_USE_MUTUAL_EXCLUSION == TRUE) return false; } #endif @@ -146,10 +152,16 @@ bool spi_start_extended(spi_start_config_t *start_config) { # if defined(AT32F415) if (roundedDivisor < 2 || roundedDivisor > 1024) { +# if (SPI_USE_MUTUAL_EXCLUSION == TRUE) + spiReleaseBus(&SPI_DRIVER); +# endif // (SPI_USE_MUTUAL_EXCLUSION == TRUE) return false; } # else if (roundedDivisor < 2 || roundedDivisor > 256) { +# if (SPI_USE_MUTUAL_EXCLUSION == TRUE) + spiReleaseBus(&SPI_DRIVER); +# endif // (SPI_USE_MUTUAL_EXCLUSION == TRUE) return false; } # endif @@ -234,6 +246,9 @@ bool spi_start_extended(spi_start_config_t *start_config) { } if (start_config->divisor < 1) { +# if (SPI_USE_MUTUAL_EXCLUSION == TRUE) + spiReleaseBus(&SPI_DRIVER); +# endif // (SPI_USE_MUTUAL_EXCLUSION == TRUE) return false; } |