mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 01:05:27 +03:00
Configurable transponder
This commit is contained in:
parent
042ffad61d
commit
fda5e0f962
6 changed files with 32 additions and 11 deletions
|
@ -152,16 +152,8 @@ void transponderIrHardwareInit(ioTag_t ioTag, transponder_t *transponder)
|
|||
DMA_ITConfig(dmaRef, DMA_IT_TC, ENABLE);
|
||||
}
|
||||
|
||||
bool transponderIrInit(const transponderProvider_e provider)
|
||||
bool transponderIrInit(const ioTag_t ioTag, const transponderProvider_e provider)
|
||||
{
|
||||
ioTag_t ioTag = IO_TAG_NONE;
|
||||
for (int i = 0; i < USABLE_TIMER_CHANNEL_COUNT; i++) {
|
||||
if (timerHardware[i].usageFlags & TIM_USE_TRANSPONDER) {
|
||||
ioTag = timerHardware[i].tag;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ioTag) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue