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)
323
323
gpio_set_pull_mode (data_pins [i ], GPIO_FLOATING );
324
324
gpio_matrix_in (data_pins [i ], CAM_DATA_IN0_IDX + i , false);
325
325
}
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
+ }
331
332
332
333
return ESP_OK ;
333
334
}
You can’t perform that action at this time.
0 commit comments