1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00

Handle NULL SPI instance case

This commit is contained in:
jflyper 2018-09-16 03:09:45 +09:00
parent 9cec06dfc5
commit 4193890b27
5 changed files with 17 additions and 3 deletions

View file

@ -37,6 +37,10 @@ void spiInitDevice(SPIDevice device)
{
spiDevice_t *spi = &(spiDevice[device]);
if (!spi->dev) {
return;
}
#ifdef SDCARD_SPI_INSTANCE
if (spi->dev == SDCARD_SPI_INSTANCE) {
spi->leadingEdge = true;