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:
parent
0b3a5a651b
commit
b8c4f7308a
3 changed files with 53 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue