mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Fix default OV5640 SYSTEM_CTROL0 value in sleep()
This commit is contained in:
parent
6954b6d858
commit
eccaeb111b
@ -697,15 +697,13 @@ static int reset(sensor_t *sensor)
|
|||||||
static int sleep(sensor_t *sensor, int enable)
|
static int sleep(sensor_t *sensor, int enable)
|
||||||
{
|
{
|
||||||
uint8_t reg;
|
uint8_t reg;
|
||||||
int ret = cambus_readb2(&sensor->bus, sensor->slv_addr, SYSTEM_CTROL0, ®);
|
|
||||||
|
|
||||||
if (enable) {
|
if (enable) {
|
||||||
reg |= 0x42;
|
reg = 0x42;
|
||||||
} else {
|
} else {
|
||||||
reg &= ~0x42;
|
reg = 0x02;
|
||||||
}
|
}
|
||||||
|
|
||||||
return cambus_writeb2(&sensor->bus, sensor->slv_addr, SYSTEM_CTROL0, reg) | ret;
|
return cambus_writeb2(&sensor->bus, sensor->slv_addr, SYSTEM_CTROL0, reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int read_reg(sensor_t *sensor, uint16_t reg_addr)
|
static int read_reg(sensor_t *sensor, uint16_t reg_addr)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user