From b83064b81a6bc8dd9d93ead57c9bc9daeef749eb Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Fri, 16 Jul 2021 21:45:08 +0200 Subject: [PATCH] Allow boards to define an extra cam timer pin. --- src/omv/ports/stm32/stm32fxxx_hal_msp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/omv/ports/stm32/stm32fxxx_hal_msp.c b/src/omv/ports/stm32/stm32fxxx_hal_msp.c index 313423638..42a5245a7 100644 --- a/src/omv/ports/stm32/stm32fxxx_hal_msp.c +++ b/src/omv/ports/stm32/stm32fxxx_hal_msp.c @@ -339,12 +339,18 @@ void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef *htim) /* Timer GPIO configuration */ GPIO_InitTypeDef GPIO_InitStructure; - GPIO_InitStructure.Pin = DCMI_TIM_PIN; GPIO_InitStructure.Pull = GPIO_PULLUP; GPIO_InitStructure.Speed = GPIO_SPEED_HIGH; GPIO_InitStructure.Mode = GPIO_MODE_AF_PP; GPIO_InitStructure.Alternate = DCMI_TIM_AF; + + GPIO_InitStructure.Pin = DCMI_TIM_PIN; HAL_GPIO_Init(DCMI_TIM_PORT, &GPIO_InitStructure); + + #if defined(DCMI_TIM_EXT_PIN) + GPIO_InitStructure.Pin = DCMI_TIM_EXT_PIN; + HAL_GPIO_Init(DCMI_TIM_EXT_PORT, &GPIO_InitStructure); + #endif } #endif // (OMV_XCLK_SOURCE == OMV_XCLK_TIM)