Code: Select all
esp_cam_ctlr_csi_config_t csi_config = {
.ctlr_id = 0,
.clk_src = MIPI_CSI_PHY_CLK_SRC_DEFAULT,
.h_res = 1920,
.v_res = 1080,
.data_lane_num = 2,
.lane_bit_rate_mbps = 594,
.input_data_color_type = CAM_CTLR_COLOR_YUV422,
.output_data_color_type = CAM_CTLR_COLOR_YUV422,
.byte_swap_en = false,
.queue_items = 1,
.bk_buffer_dis = true,
};
esp_cam_ctlr_handle_t cam_handle = NULL;
esp_err_t ret = esp_cam_new_csi_ctlr(&csi_config, &cam_handle);
isp_proc_handle_t isp_proc = NULL;
esp_isp_processor_cfg_t isp_config = {
.clk_src = ISP_CLK_SRC_PLL240,
.clk_hz = 240 * 1000 * 1000,
.input_data_source = ISP_INPUT_DATA_SOURCE_CSI,
.input_data_color_type = ISP_COLOR_YUV422,
.output_data_color_type = ISP_COLOR_YUV422,
.has_line_start_packet = false,
.has_line_end_packet = false,
.h_res = 1920,
.v_res = 1080,
.flags.bypass_isp = true,
};
ESP_ERROR_CHECK(esp_isp_new_processor(&isp_config, &isp_proc));