1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

Timer clean up in preparation for configurable timers

This commit is contained in:
blckmn 2018-05-06 06:54:39 +10:00
parent 5e1b5df5d4
commit aad6efdf03
19 changed files with 125 additions and 87 deletions

View file

@ -673,7 +673,7 @@ static serialPort_t *openEscSerial(escSerialPortIndex_e portIndex, serialReceive
}
escSerial->mode = mode;
escSerial->txTimerHardware = timerGetByTag(escSerialConfig()->ioTag, TIM_USE_ANY);
escSerial->txTimerHardware = timerGetByTag(escSerialConfig()->ioTag);
#ifdef USE_HAL_DRIVER
escSerial->txTimerHandle = timerFindTimerHandle(escSerial->txTimerHardware->tim);
@ -952,7 +952,7 @@ void escEnablePassthrough(serialPort_t *escPassthroughPort, uint16_t output, uin
}
else {
uint8_t first_output = 0;
for (int i = 0; i < USABLE_TIMER_CHANNEL_COUNT; i++) {
for (unsigned i = 0; i < USABLE_TIMER_CHANNEL_COUNT; i++) {
if (timerHardware[i].usageFlags & TIM_USE_MOTOR) {
first_output = i;
break;