Skip to content

Commit 4ff7f34

Browse files
authored
Merge pull request #4 from deshipu/circuitpython
Make xclk pin optional
2 parents 7e51ff7 + d117548 commit 4ff7f34

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

target/xclk.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ esp_err_t xclk_timer_conf(int ledc_timer, int xclk_freq_hz)
3636

3737
esp_err_t camera_enable_out_clock(camera_config_t* config)
3838
{
39+
if (config->ledc_channel == NO_CAMERA_LEDC_CHANNEL) {
40+
g_ledc_channel = NO_CAMERA_LEDC_CHANNEL;
41+
return ESP_OK;
42+
}
43+
3944
esp_err_t err = xclk_timer_conf(config->ledc_timer, config->xclk_freq_hz);
4045
if (err != ESP_OK) {
4146
ESP_LOGE(TAG, "ledc_timer_config failed, rc=%x", err);

0 commit comments

Comments
 (0)