mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
misc/csi: Don't fail if sleep is not implemented.
At the very least, sleep will abort the transfer on low-power entry or exit, even if it's not fully supported.
This commit is contained in:
parent
24e14d5418
commit
7daf84a1f6
@ -584,13 +584,9 @@ __weak int omv_csi_sleep(int enable) {
|
||||
// Disable any ongoing frame capture.
|
||||
omv_csi_abort(true, false);
|
||||
|
||||
// Check if the control is supported.
|
||||
if (csi.sleep == NULL) {
|
||||
return OMV_CSI_ERROR_CTL_UNSUPPORTED;
|
||||
}
|
||||
|
||||
// Call the sensor specific function.
|
||||
if (csi.sleep(&csi, enable) != 0) {
|
||||
if (csi.sleep != NULL &&
|
||||
csi.sleep(&csi, enable) != 0) {
|
||||
return OMV_CSI_ERROR_CTL_FAILED;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user