mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
change(isp): don't init unnecessary isp pipeline items when doing isp_new_processor
This commit is contained in:
parent
efe63f8950
commit
b4ddeeeeb9
@ -56,6 +56,7 @@ esp_err_t esp_isp_bf_enable(isp_proc_handle_t proc)
|
|||||||
ESP_RETURN_ON_FALSE(proc, ESP_ERR_INVALID_ARG, TAG, "invalid argument: null pointer");
|
ESP_RETURN_ON_FALSE(proc, ESP_ERR_INVALID_ARG, TAG, "invalid argument: null pointer");
|
||||||
ESP_RETURN_ON_FALSE(proc->bf_fsm == ISP_FSM_INIT, ESP_ERR_INVALID_STATE, TAG, "bf is enabled already");
|
ESP_RETURN_ON_FALSE(proc->bf_fsm == ISP_FSM_INIT, ESP_ERR_INVALID_STATE, TAG, "bf is enabled already");
|
||||||
|
|
||||||
|
isp_ll_bf_clk_enable(proc->hal.hw, true);
|
||||||
isp_ll_bf_enable(proc->hal.hw, true);
|
isp_ll_bf_enable(proc->hal.hw, true);
|
||||||
proc->bf_fsm = ISP_FSM_ENABLE;
|
proc->bf_fsm = ISP_FSM_ENABLE;
|
||||||
|
|
||||||
@ -68,6 +69,7 @@ esp_err_t esp_isp_bf_disable(isp_proc_handle_t proc)
|
|||||||
ESP_RETURN_ON_FALSE(proc->bf_fsm == ISP_FSM_ENABLE, ESP_ERR_INVALID_STATE, TAG, "bf isn't enabled yet");
|
ESP_RETURN_ON_FALSE(proc->bf_fsm == ISP_FSM_ENABLE, ESP_ERR_INVALID_STATE, TAG, "bf isn't enabled yet");
|
||||||
|
|
||||||
isp_ll_bf_enable(proc->hal.hw, false);
|
isp_ll_bf_enable(proc->hal.hw, false);
|
||||||
|
isp_ll_bf_clk_enable(proc->hal.hw, false);
|
||||||
proc->bf_fsm = ISP_FSM_INIT;
|
proc->bf_fsm = ISP_FSM_INIT;
|
||||||
|
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
|
@ -104,13 +104,6 @@ esp_err_t esp_isp_new_processor(const esp_isp_processor_cfg_t *proc_config, isp_
|
|||||||
}
|
}
|
||||||
|
|
||||||
isp_hal_init(&proc->hal, proc->proc_id);
|
isp_hal_init(&proc->hal, proc->proc_id);
|
||||||
//necessary ISP submodules that needs basic initialisation
|
|
||||||
isp_ll_bf_clk_enable(proc->hal.hw, true);
|
|
||||||
isp_ll_bf_enable(proc->hal.hw, true);
|
|
||||||
isp_ll_ccm_clk_enable(proc->hal.hw, true);
|
|
||||||
isp_ll_ccm_enable(proc->hal.hw, true);
|
|
||||||
isp_ll_color_clk_enable(proc->hal.hw, true);
|
|
||||||
isp_ll_color_enable(proc->hal.hw, true);
|
|
||||||
PERIPH_RCC_ATOMIC() {
|
PERIPH_RCC_ATOMIC() {
|
||||||
isp_ll_select_clk_source(proc->hal.hw, clk_src);
|
isp_ll_select_clk_source(proc->hal.hw, clk_src);
|
||||||
isp_ll_set_clock_div(proc->hal.hw, &clk_div);
|
isp_ll_set_clock_div(proc->hal.hw, &clk_div);
|
||||||
|
Loading…
Reference in New Issue
Block a user