mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge pull request #893 from openmv/sensor_reset
Do hard-reset in sensor.reset().
This commit is contained in:
commit
ac653ed36f
@ -500,6 +500,18 @@ int sensor_reset()
|
||||
// Restore shutdown state on reset.
|
||||
sensor_shutdown(false);
|
||||
|
||||
// Hard-reset the sensor
|
||||
if (sensor.reset_pol == ACTIVE_HIGH) {
|
||||
DCMI_RESET_HIGH();
|
||||
systick_sleep(10);
|
||||
DCMI_RESET_LOW();
|
||||
} else {
|
||||
DCMI_RESET_LOW();
|
||||
systick_sleep(10);
|
||||
DCMI_RESET_HIGH();
|
||||
}
|
||||
systick_sleep(20);
|
||||
|
||||
// Call sensor-specific reset function
|
||||
if (sensor.reset(&sensor) != 0) {
|
||||
return -1;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user