mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(csi): fixed csi wrong state machine settings
This commit is contained in:
parent
70d2ed5ee8
commit
6930bfdef6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user