mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 11:59:58 +03:00
Avoid initializing TIM_USE_NONE pins
This commit is contained in:
parent
b2cd7294e9
commit
58ae4d494a
2 changed files with 6 additions and 0 deletions
|
@ -709,6 +709,9 @@ void timerInit(void)
|
|||
#if defined(STM32F3) || defined(STM32F4)
|
||||
for (int timerIndex = 0; timerIndex < USABLE_TIMER_CHANNEL_COUNT; timerIndex++) {
|
||||
const timerHardware_t *timerHardwarePtr = &timerHardware[timerIndex];
|
||||
if (timerHardwarePtr->usageFlags == TIM_USE_NONE) {
|
||||
continue;
|
||||
}
|
||||
IOConfigGPIOAF(IOGetByTag(timerHardwarePtr->tag), IOCFG_AF_PP, timerHardwarePtr->alternateFunction);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue