Merge pull request #7899 from etracer65/fix_f1_compile
Fix F1 compile errors
This commit is contained in:
commit
c5e3a51100
|
@ -687,7 +687,11 @@ void beeperPwmInit(const ioTag_t tag, uint16_t frequency)
|
|||
if (beeperIO && timer) {
|
||||
beeperPwm.io = beeperIO;
|
||||
IOInit(beeperPwm.io, OWNER_BEEPER, RESOURCE_INDEX(0));
|
||||
#if defined(STM32F1)
|
||||
IOConfigGPIO(beeperPwm.io, IOCFG_AF_PP);
|
||||
#else
|
||||
IOConfigGPIOAF(beeperPwm.io, IOCFG_AF_PP, timer->alternateFunction);
|
||||
#endif
|
||||
freqBeep = frequency;
|
||||
pwmOutConfig(&beeperPwm.channel, timer, PWM_TIMER_1MHZ, PWM_TIMER_1MHZ / freqBeep, (PWM_TIMER_1MHZ / freqBeep) / 2, 0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue