1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 21:35:44 +03:00

Merge pull request #4192 from jflyper/bfdev-camcontrol-regression-3991

F3/F4 CamControl: Do proper IOConfigGPIOAF for PWM case
This commit is contained in:
jflyper 2017-09-21 02:12:24 +09:00 committed by GitHub
commit b80bae844a

View file

@ -108,10 +108,10 @@ void cameraControlInit()
return;
}
#ifdef USE_HAL_DRIVER
IOConfigGPIOAF(cameraControlRuntime.io, IOCFG_AF_PP, timerHardware->alternateFunction);
#ifdef STM32F1
IOConfigGPIO(cameraControlRuntime.io, IOCFG_AF_PP);
#else
IOConfigGPIO(cameraControlRuntime.io, IOCFG_AF_PP);
IOConfigGPIOAF(cameraControlRuntime.io, IOCFG_AF_PP, timerHardware->alternateFunction);
#endif
pwmOutConfig(&cameraControlRuntime.channel, timerHardware, CAMERA_CONTROL_TIMER_HZ, CAMERA_CONTROL_PWM_RESOLUTION, 0, 0);