mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge pull request #1398 from openmv/tim_ext
Allow boards to define an extra cam timer pin.
This commit is contained in:
commit
a9192f643c
@ -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)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user