From 503b8dbbfee0fc2381cf98487ffec9a606ac8c95 Mon Sep 17 00:00:00 2001 From: jflyper Date: Wed, 20 Sep 2017 12:11:23 +0900 Subject: [PATCH] Issue proper IOConfigGPIOAF for non-F1 targets --- src/main/drivers/camera_control.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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);