1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-26 09:45:37 +03:00

Fix missing SPI5 and SPI6 configuration.

* Missing SPI5/SPI6 devices.
* Support SPI5/6 on the STMH743 unified target.

There were no defaults for the `SPI_FULL_RECONFIGURABILITY` option.
This commit is contained in:
Dominic Clifton 2021-04-15 18:42:01 +02:00 committed by Dominic Clifton
parent 0b3a5a651b
commit b8c4f7308a
3 changed files with 53 additions and 4 deletions

View file

@ -46,23 +46,39 @@ busDevice_t spiBusDevice[SPIDEV_COUNT];
SPIDevice spiDeviceByInstance(SPI_TypeDef *instance)
{
#ifdef USE_SPI_DEVICE_1
if (instance == SPI1)
if (instance == SPI1) {
return SPIDEV_1;
}
#endif
#ifdef USE_SPI_DEVICE_2
if (instance == SPI2)
if (instance == SPI2) {
return SPIDEV_2;
}
#endif
#ifdef USE_SPI_DEVICE_3
if (instance == SPI3)
if (instance == SPI3) {
return SPIDEV_3;
}
#endif
#ifdef USE_SPI_DEVICE_4
if (instance == SPI4)
if (instance == SPI4) {
return SPIDEV_4;
}
#endif
#ifdef USE_SPI_DEVICE_5
if (instance == SPI5) {
return SPIDEV_5;
}
#endif
#ifdef USE_SPI_DEVICE_6
if (instance == SPI6) {
return SPIDEV_6;
}
#endif
return SPIINVALID;