1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-14 03:50:02 +03:00

Remove superfluous timerHardware properties

-> todo: remove the IO_CFG definitions and add flags for purpose
This commit is contained in:
blckmn 2016-10-15 17:04:45 +11:00
parent e65a77e87e
commit 4924894f41
43 changed files with 485 additions and 497 deletions

View file

@ -720,10 +720,11 @@ void timerInit(void)
RCC_ClockCmd(timerRCC(timerHardware[i].tim), ENABLE);
}
/* TODO: remove this in favour of setting up at the time of initilisation of the feature using the timer */
#if defined(STM32F3) || defined(STM32F4)
for (uint8_t timerIndex = 0; timerIndex < USABLE_TIMER_CHANNEL_COUNT; timerIndex++) {
const timerHardware_t *timerHardwarePtr = &timerHardware[timerIndex];
IOConfigGPIOAF(IOGetByTag(timerHardwarePtr->tag), timerHardwarePtr->ioMode, timerHardwarePtr->alternateFunction);
IOConfigGPIOAF(IOGetByTag(timerHardwarePtr->tag), timerHardwarePtr->ioMode, timerGPIOAF(timerHardwarePtr->tim));
}
#endif