mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
NANO: Configure PDWN and RST in sensor_init
This commit is contained in:
parent
d4859f58a8
commit
eba6ad937d
@ -144,14 +144,6 @@ static int dcmi_config()
|
|||||||
_hrefPort = portInputRegister(digitalPinToPort(DCMI_HSYNC_PIN));
|
_hrefPort = portInputRegister(digitalPinToPort(DCMI_HSYNC_PIN));
|
||||||
_pclkPort = portInputRegister(digitalPinToPort(DCMI_PXCLK_PIN));
|
_pclkPort = portInputRegister(digitalPinToPort(DCMI_PXCLK_PIN));
|
||||||
|
|
||||||
#if defined(DCMI_PWDN_PIN)
|
|
||||||
nrf_gpio_cfg_output(DCMI_PWDN_PIN);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(DCMI_RESET_PIN)
|
|
||||||
nrf_gpio_cfg_output(DCMI_RESET_PIN);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,6 +151,16 @@ int sensor_init()
|
|||||||
{
|
{
|
||||||
int init_ret = 0;
|
int init_ret = 0;
|
||||||
|
|
||||||
|
#if defined(DCMI_PWDN_PIN)
|
||||||
|
nrf_gpio_cfg_output(DCMI_PWDN_PIN);
|
||||||
|
DCMI_PWDN_HIGH();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(DCMI_RESET_PIN)
|
||||||
|
nrf_gpio_cfg_output(DCMI_RESET_PIN);
|
||||||
|
DCMI_RESET_HIGH();
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Do a power cycle */
|
/* Do a power cycle */
|
||||||
DCMI_PWDN_HIGH();
|
DCMI_PWDN_HIGH();
|
||||||
mp_hal_delay_ms(10);
|
mp_hal_delay_ms(10);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user