Added missing code to enable SPI4/5/6

This commit is contained in:
pchmura4 2024-02-26 19:32:47 +01:00 committed by rusefillc
parent 1e76efdb1a
commit c81f22ac90
1 changed files with 10 additions and 0 deletions

View File

@ -136,6 +136,16 @@ SPIDriver * getSpiDevice(spi_device_e spiDevice) {
if (spiDevice == SPI_DEVICE_4) {
return &SPID4;
}
#endif
#if STM32_SPI_USE_SPI5
if (spiDevice == SPI_DEVICE_5) {
return &SPID5;
}
#endif
#if STM32_SPI_USE_SPI6
if (spiDevice == SPI_DEVICE_6) {
return &SPID6;
}
#endif
firmwareError(ObdCode::CUSTOM_ERR_UNEXPECTED_SPI, "Unexpected SPI device: %d", spiDevice);
return NULL;