Merge pull request #1193 from openmv/nano_updates

Nano updates
This commit is contained in:
Ibrahim Abd Elkader 2021-02-26 00:19:15 +02:00 committed by GitHub
commit b898f0bb8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 11 deletions

View File

@ -104,7 +104,7 @@
#define ISC_I2C_ID (0)
#define ISC_I2C_SCL_PIN (2)
#define ISC_I2C_SDA_PIN (31)
#define ISC_I2C_SPEED (CAMBUS_SPEED_FULL)
#define ISC_I2C_SPEED (CAMBUS_SPEED_STANDARD)
// I2C0
#define TWI0_ID (0)
@ -125,7 +125,7 @@
// DCMI
#define DCMI_PWDN_PIN (29)
//#define DCMI_RESET_PIN (30)
#define DCMI_RESET_PIN (30)
#define DCMI_D0_PIN (32+2)
#define DCMI_D1_PIN (32+3)

View File

@ -114,7 +114,7 @@ int cambus_readb(cambus_t *bus, uint8_t slv_addr, uint8_t reg_addr, uint8_t *reg
nrfx_twi_enable(&bus->i2c);
nrfx_twi_xfer_desc_t desc1 = NRFX_TWI_XFER_DESC_TX(slv_addr, &reg_addr, 1);
if (nrfx_twi_xfer(&bus->i2c, &desc1, NRFX_TWI_FLAG_TX_NO_STOP) != NRFX_SUCCESS) {
if (nrfx_twi_xfer(&bus->i2c, &desc1, 0) != NRFX_SUCCESS) {
ret = -1;
goto i2c_error;
}

View File

@ -144,14 +144,6 @@ static int dcmi_config()
_hrefPort = portInputRegister(digitalPinToPort(DCMI_HSYNC_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;
}
@ -159,6 +151,16 @@ int sensor_init()
{
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 */
DCMI_PWDN_HIGH();
mp_hal_delay_ms(10);