Add shutdown function.

This commit is contained in:
iabdalkader 2018-09-05 16:44:58 +02:00
parent 2e67a80bf3
commit 4eb2f1ac35
2 changed files with 15 additions and 0 deletions

View File

@ -405,6 +405,18 @@ int sensor_sleep(int enable)
return 0;
}
int sensor_shutdown(int enable)
{
if (enable) {
DCMI_PWDN_HIGH();
} else {
DCMI_PWDN_LOW();
}
systick_sleep(10);
return 0;
}
int sensor_read_reg(uint8_t reg_addr)
{
if (sensor.read_reg == NULL) {

View File

@ -168,6 +168,9 @@ int sensor_get_id();
// Sleep mode.
int sensor_sleep(int enable);
// Shutdown mode.
int sensor_shutdown(int enable);
// Read a sensor register.
int sensor_read_reg(uint8_t reg_addr);