mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-25 17:25:18 +03:00
Correctly handle timer overflow in PWM RX mode when timer period is not 0xFFFF (i.e. when timer is shared with PWM output)
This commit is contained in:
parent
6b28d5f995
commit
3a73cec146
3 changed files with 13 additions and 3 deletions
|
@ -509,7 +509,10 @@ volatile timCCR_t* timerChCCRLo(const timerHardware_t *timHw)
|
|||
return (volatile timCCR_t*)((volatile char*)&timHw->tim->CCR1 + (timHw->channel & ~TIM_Channel_2));
|
||||
}
|
||||
|
||||
|
||||
uint16_t timerGetPeriod(const timerHardware_t *timHw)
|
||||
{
|
||||
return timHw->tim->ARR;
|
||||
}
|
||||
|
||||
volatile timCCR_t* timerChCCR(const timerHardware_t *timHw)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue