1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-18 13:55:18 +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; return;
} }
#ifdef USE_HAL_DRIVER #ifdef STM32F1
IOConfigGPIOAF(cameraControlRuntime.io, IOCFG_AF_PP, timerHardware->alternateFunction); IOConfigGPIO(cameraControlRuntime.io, IOCFG_AF_PP);
#else #else
IOConfigGPIO(cameraControlRuntime.io, IOCFG_AF_PP); IOConfigGPIOAF(cameraControlRuntime.io, IOCFG_AF_PP, timerHardware->alternateFunction);
#endif #endif
pwmOutConfig(&cameraControlRuntime.channel, timerHardware, CAMERA_CONTROL_TIMER_HZ, CAMERA_CONTROL_PWM_RESOLUTION, 0, 0); pwmOutConfig(&cameraControlRuntime.channel, timerHardware, CAMERA_CONTROL_TIMER_HZ, CAMERA_CONTROL_PWM_RESOLUTION, 0, 0);