mirror of
https://github.com/openmv/openmv.git
synced 2025-09-26 23:09:13 +08:00
common/omv_csi: Allow IOCTLs to return positive values.
This commit is contained in:
parent
8d03d2bc5e
commit
ea0505d52e
@ -1353,7 +1353,7 @@ __weak int omv_csi_ioctl(omv_csi_t *csi, int request, ... /* arg */) {
|
||||
int ret = csi->ioctl(csi, request, ap);
|
||||
va_end(ap);
|
||||
|
||||
return ((ret != 0) ? OMV_CSI_ERROR_CTL_FAILED : 0);
|
||||
return ((ret < 0) ? OMV_CSI_ERROR_CTL_FAILED : ret);
|
||||
}
|
||||
|
||||
__weak int omv_csi_set_vsync_callback(omv_csi_t *csi, omv_csi_cb_t cb) {
|
||||
|
@ -1116,7 +1116,7 @@ static mp_obj_t py_omv_csi_ioctl(size_t n_args, const mp_obj_t *args) {
|
||||
}
|
||||
}
|
||||
|
||||
if (error != 0) {
|
||||
if (error < 0) {
|
||||
omv_csi_raise_error(error);
|
||||
}
|
||||
|
||||
|
@ -1198,7 +1198,7 @@ static mp_obj_t py_csi_ioctl(size_t n_args, const mp_obj_t *args) {
|
||||
}
|
||||
}
|
||||
|
||||
if (error != 0) {
|
||||
if (error < 0) {
|
||||
omv_csi_raise_error(error);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user