1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-26 01:35:41 +03:00

[H7] Enable SPI with resurrected HAL-based driver from v3.1.7

This commit is contained in:
jflyper 2019-04-21 18:24:25 +09:00
parent 77ef37bad0
commit 82c978a828
7 changed files with 434 additions and 11 deletions

View file

@ -74,6 +74,7 @@ bool spiInit(SPIDevice device)
switch (device) {
case SPIINVALID:
return false;
case SPIDEV_1:
#ifdef USE_SPI_DEVICE_1
spiInitDevice(device);
@ -81,6 +82,7 @@ bool spiInit(SPIDevice device)
#else
break;
#endif
case SPIDEV_2:
#ifdef USE_SPI_DEVICE_2
spiInitDevice(device);
@ -88,6 +90,7 @@ bool spiInit(SPIDevice device)
#else
break;
#endif
case SPIDEV_3:
#if defined(USE_SPI_DEVICE_3) && !defined(STM32F1)
spiInitDevice(device);
@ -95,6 +98,7 @@ bool spiInit(SPIDevice device)
#else
break;
#endif
case SPIDEV_4:
#if defined(USE_SPI_DEVICE_4)
spiInitDevice(device);
@ -102,6 +106,22 @@ bool spiInit(SPIDevice device)
#else
break;
#endif
case SPIDEV_5:
#if defined(USE_SPI_DEVICE_5)
spiInitDevice(device);
return true;
#else
break;
#endif
case SPIDEV_6:
#if defined(USE_SPI_DEVICE_6)
spiInitDevice(device);
return true;
#else
break;
#endif
}
return false;
}