Skip to content

Commit

Permalink
fix(xclk): Zero init ledc_channel_config_t for forward compatibility
Browse files Browse the repository at this point in the history
LEDC driver was extended in espressif/esp-idf@4a90deb with new config structure members.
We must zero init the config struct to get default behavior.
  • Loading branch information
tore-espressif authored Nov 15, 2024
1 parent 261e8eb commit d9ee211
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target/xclk.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ esp_err_t camera_enable_out_clock(const camera_config_t* config)
}

g_ledc_channel = config->ledc_channel;
ledc_channel_config_t ch_conf;
ledc_channel_config_t ch_conf = {0};
ch_conf.gpio_num = config->pin_xclk;
ch_conf.speed_mode = LEDC_LOW_SPEED_MODE;
ch_conf.channel = config->ledc_channel;
Expand Down

0 comments on commit d9ee211

Please sign in to comment.