Added missing code to enable SPI4/5/6
This commit is contained in:
parent
1e76efdb1a
commit
c81f22ac90
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue