mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
common/csi: Add shutdown op.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
This commit is contained in:
parent
851af8ceba
commit
58d69cd571
@ -576,10 +576,15 @@ __weak int omv_csi_shutdown(omv_csi_t *csi, int enable) {
|
||||
} else {
|
||||
omv_gpio_write(OMV_CSI_POWER_PIN, 1);
|
||||
}
|
||||
mp_hal_delay_ms(OMV_CSI_POWER_DELAY);
|
||||
}
|
||||
#endif
|
||||
|
||||
mp_hal_delay_ms(10);
|
||||
// Call csi-specific shutdown function
|
||||
if (csi->shutdown != NULL &&
|
||||
csi->shutdown(csi, enable) != 0) {
|
||||
return OMV_CSI_ERROR_CTL_FAILED;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -354,6 +354,7 @@ typedef struct _omv_csi {
|
||||
// Sensor function pointers
|
||||
int (*reset) (omv_csi_t *csi);
|
||||
int (*sleep) (omv_csi_t *csi, int enable);
|
||||
int (*shutdown) (omv_csi_t *csi, int enable);
|
||||
int (*match) (omv_csi_t *csi, size_t id);
|
||||
int (*read_reg) (omv_csi_t *csi, uint16_t reg_addr);
|
||||
int (*write_reg) (omv_csi_t *csi, uint16_t reg_addr, uint16_t reg_data);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user