diff --git a/src/main/drivers/camera_control.c b/src/main/drivers/camera_control.c index e1daf12994..82ef9ef0f7 100644 --- a/src/main/drivers/camera_control.c +++ b/src/main/drivers/camera_control.c @@ -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);