Skip to content

Commit 2ed780b

Browse files
committed
fix(isp): fixed af environment detector lack of configuration issue
1 parent a9383cb commit 2ed780b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

components/esp_driver_isp/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ endif()
99

1010
idf_component_register(SRCS ${srcs}
1111
INCLUDE_DIRS ${public_include}
12+
PRIV_REQUIRES esp_driver_gpio
1213
)

components/esp_driver_isp/src/isp_af.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ esp_err_t esp_isp_af_controller_set_env_detector(isp_af_ctrlr_t af_ctrlr, const
174174
isp_ll_af_env_monitor_set_period(af_ctrlr->isp_proc->hal.hw, 0);
175175
isp_ll_clear_intr(af_ctrlr->isp_proc->hal.hw, ISP_LL_EVENT_AF_ENV);
176176

177+
isp_ll_af_env_monitor_set_mode(af_ctrlr->isp_proc->hal.hw, ISP_LL_AF_ENV_MONITOR_MODE_ABS);
178+
isp_ll_af_env_monitor_set_period(af_ctrlr->isp_proc->hal.hw, af_ctrlr->config.interval);
179+
isp_ll_enable_intr(af_ctrlr->isp_proc->hal.hw, ISP_LL_EVENT_AF_ENV, true);
180+
177181
return ESP_OK;
178182
}
179183

@@ -196,7 +200,7 @@ esp_err_t esp_isp_af_env_detector_register_event_callbacks(isp_af_ctrlr_t af_ctr
196200
return ESP_OK;
197201
}
198202

199-
esp_err_t esp_isp_af_env_detector_set_threshold(isp_af_ctrlr_t af_ctrlr, int definition_thresh, int luminance_thresh)
203+
esp_err_t esp_isp_af_controller_set_env_detector_threshold(isp_af_ctrlr_t af_ctrlr, int definition_thresh, int luminance_thresh)
200204
{
201205
ESP_RETURN_ON_FALSE_ISR(af_ctrlr, ESP_ERR_INVALID_ARG, TAG, "invalid argument");
202206
ESP_RETURN_ON_FALSE_ISR(af_ctrlr->fsm == ISP_FSM_ENABLE, ESP_ERR_INVALID_STATE, TAG, "detector isn't in enable state");

0 commit comments

Comments
 (0)