mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 01:35:41 +03:00
Merge pull request #10694 from hydra/bf-spi-fixes-1
Fix missing SPI5/6 configuration.
This commit is contained in:
commit
4b44378b4d
3 changed files with 53 additions and 4 deletions
|
@ -47,23 +47,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