mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Check if PWDN and RESET are defined before configuring I/Os.
This commit is contained in:
parent
2a8be10ca0
commit
a12ab145e5
@ -130,11 +130,15 @@ void HAL_MspInit(void)
|
|||||||
GPIO_InitStructure.Speed = GPIO_SPEED_LOW;
|
GPIO_InitStructure.Speed = GPIO_SPEED_LOW;
|
||||||
GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP;
|
GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
|
|
||||||
|
#if defined(DCMI_RESET_PIN)
|
||||||
GPIO_InitStructure.Pin = DCMI_RESET_PIN;
|
GPIO_InitStructure.Pin = DCMI_RESET_PIN;
|
||||||
HAL_GPIO_Init(DCMI_RESET_PORT, &GPIO_InitStructure);
|
HAL_GPIO_Init(DCMI_RESET_PORT, &GPIO_InitStructure);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(DCMI_PWDN_PIN)
|
||||||
GPIO_InitStructure.Pin = DCMI_PWDN_PIN;
|
GPIO_InitStructure.Pin = DCMI_PWDN_PIN;
|
||||||
HAL_GPIO_Init(DCMI_PWDN_PORT, &GPIO_InitStructure);
|
HAL_GPIO_Init(DCMI_PWDN_PORT, &GPIO_InitStructure);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(DCMI_FSYNC_PIN)
|
#if defined(DCMI_FSYNC_PIN)
|
||||||
GPIO_InitStructure.Pin = DCMI_FSYNC_PIN;
|
GPIO_InitStructure.Pin = DCMI_FSYNC_PIN;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user