From 6930bfdef6d5b83f8a58bad837571dc404779005 Mon Sep 17 00:00:00 2001 From: Armando Date: Thu, 23 May 2024 13:13:19 +0800 Subject: [PATCH] fix(csi): fixed csi wrong state machine settings --- components/esp_driver_cam/csi/src/esp_cam_ctlr_csi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esp_driver_cam/csi/src/esp_cam_ctlr_csi.c b/components/esp_driver_cam/csi/src/esp_cam_ctlr_csi.c index 20b11ac0d1..21b09869dc 100644 --- a/components/esp_driver_cam/csi/src/esp_cam_ctlr_csi.c +++ b/components/esp_driver_cam/csi/src/esp_cam_ctlr_csi.c @@ -406,7 +406,7 @@ esp_err_t s_csi_ctlr_disable(esp_cam_ctlr_handle_t handle) { ESP_RETURN_ON_FALSE(handle, ESP_ERR_INVALID_ARG, TAG, "invalid argument: null pointer"); csi_controller_t *ctlr = __containerof(handle, csi_controller_t, base); - ESP_RETURN_ON_FALSE(ctlr->csi_fsm == CSI_FSM_ENABLED, ESP_ERR_INVALID_STATE, TAG, "processor isn't in init state"); + ESP_RETURN_ON_FALSE(ctlr->csi_fsm == CSI_FSM_ENABLED, ESP_ERR_INVALID_STATE, TAG, "processor isn't in enable state"); portENTER_CRITICAL(&ctlr->spinlock); ctlr->csi_fsm = CSI_FSM_INIT; @@ -486,7 +486,7 @@ esp_err_t s_ctlr_csi_stop(esp_cam_ctlr_handle_t handle) ESP_RETURN_ON_ERROR(dw_gdma_channel_enable_ctrl(ctlr->dma_chan, false), TAG, "failed to disable dwgdma"); portENTER_CRITICAL(&ctlr->spinlock); - ctlr->csi_fsm = CSI_FSM_INIT; + ctlr->csi_fsm = CSI_FSM_ENABLED; portEXIT_CRITICAL(&ctlr->spinlock); return ESP_OK;