mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 01:35:41 +03:00
Check for bus number 0 in spiSetBusInstance()
This commit is contained in:
parent
7a3cbd0706
commit
71f8eb866f
1 changed files with 1 additions and 1 deletions
|
@ -486,7 +486,7 @@ static void spiRxIrqHandler(dmaChannelDescriptor_t* descriptor)
|
||||||
// Mark this bus as being SPI
|
// Mark this bus as being SPI
|
||||||
bool spiSetBusInstance(extDevice_t *dev, uint32_t device)
|
bool spiSetBusInstance(extDevice_t *dev, uint32_t device)
|
||||||
{
|
{
|
||||||
if (device > SPIDEV_COUNT) {
|
if ((device == 0) || (device > SPIDEV_COUNT)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue