mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 05:45:31 +03:00
Do proper IOConfigGPIOAF in ppmRxInit and pwmRxInit
Regression after #3991
This commit is contained in:
parent
c4e47ddede
commit
f3f7029e85
1 changed files with 2 additions and 7 deletions
|
@ -385,12 +385,9 @@ void pwmRxInit(const pwmConfig_t *pwmConfig)
|
|||
IOInit(io, OWNER_PWMINPUT, RESOURCE_INDEX(channel));
|
||||
#ifdef STM32F1
|
||||
IOConfigGPIO(io, IOCFG_IPD);
|
||||
#elif defined(STM32F7)
|
||||
IOConfigGPIOAF(io, IOCFG_AF_PP, timer->alternateFunction);
|
||||
#else
|
||||
IOConfigGPIO(io, IOCFG_AF_PP);
|
||||
IOConfigGPIOAF(io, IOCFG_AF_PP, timer->alternateFunction);
|
||||
#endif
|
||||
|
||||
timerConfigure(timer, (uint16_t)PWM_TIMER_PERIOD, PWM_TIMER_1MHZ);
|
||||
timerChCCHandlerInit(&port->edgeCb, pwmEdgeCallback);
|
||||
timerChOvrHandlerInit(&port->overflowCb, pwmOverflowCallback);
|
||||
|
@ -442,10 +439,8 @@ void ppmRxInit(const ppmConfig_t *ppmConfig)
|
|||
IOInit(io, OWNER_PPMINPUT, 0);
|
||||
#ifdef STM32F1
|
||||
IOConfigGPIO(io, IOCFG_IPD);
|
||||
#elif defined(STM32F7)
|
||||
IOConfigGPIOAF(io, IOCFG_AF_PP, timer->alternateFunction);
|
||||
#else
|
||||
IOConfigGPIO(io, IOCFG_AF_PP);
|
||||
IOConfigGPIOAF(io, IOCFG_AF_PP, timer->alternateFunction);
|
||||
#endif
|
||||
|
||||
timerConfigure(timer, (uint16_t)PPM_TIMER_PERIOD, PWM_TIMER_1MHZ);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue