mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 01:05:27 +03:00
Prevent hard-fault when no IO available for transponder.
This cleans up the transponder api too.
This commit is contained in:
parent
b7caf6f85e
commit
3c29725672
6 changed files with 21 additions and 21 deletions
|
@ -39,7 +39,7 @@ uint8_t transponderIrDMABuffer[TRANSPONDER_DMA_BUFFER_SIZE];
|
|||
|
||||
volatile uint8_t transponderIrDataTransferInProgress = 0;
|
||||
|
||||
void transponderIrInit(void)
|
||||
bool transponderIrInit(void)
|
||||
{
|
||||
memset(&transponderIrDMABuffer, 0, TRANSPONDER_DMA_BUFFER_SIZE);
|
||||
|
||||
|
@ -51,7 +51,13 @@ void transponderIrInit(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (!ioTag) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
transponderIrHardwareInit(ioTag);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool isTransponderIrReady(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue