File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -323,11 +323,12 @@ esp_err_t ll_cam_set_pin(cam_obj_t *cam, const camera_config_t *config)
323323 gpio_set_pull_mode (data_pins [i ], GPIO_FLOATING );
324324 gpio_matrix_in (data_pins [i ], CAM_DATA_IN0_IDX + i , false);
325325 }
326-
327- PIN_FUNC_SELECT (GPIO_PIN_MUX_REG [config -> pin_xclk ], PIN_FUNC_GPIO );
328- gpio_set_direction (config -> pin_xclk , GPIO_MODE_OUTPUT );
329- gpio_set_pull_mode (config -> pin_xclk , GPIO_FLOATING );
330- gpio_matrix_out (config -> pin_xclk , CAM_CLK_IDX , false, false);
326+ if (config -> pin_xclk >= 0 ) {
327+ PIN_FUNC_SELECT (GPIO_PIN_MUX_REG [config -> pin_xclk ], PIN_FUNC_GPIO );
328+ gpio_set_direction (config -> pin_xclk , GPIO_MODE_OUTPUT );
329+ gpio_set_pull_mode (config -> pin_xclk , GPIO_FLOATING );
330+ gpio_matrix_out (config -> pin_xclk , CAM_CLK_IDX , false, false);
331+ }
331332
332333 return ESP_OK ;
333334}
You can’t perform that action at this time.
0 commit comments