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:
parent
9cec06dfc5
commit
4193890b27
5 changed files with 17 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue