From d9ee2114c92e189fa446634118b9050ca0e53b08 Mon Sep 17 00:00:00 2001 From: Tomas Rezucha Date: Fri, 15 Nov 2024 08:43:49 +0100 Subject: [PATCH] fix(xclk): Zero init ledc_channel_config_t for forward compatibility LEDC driver was extended in https://github.com/espressif/esp-idf/commit/4a90deb2278322e6c605484770caafebfbbc615f with new config structure members. We must zero init the config struct to get default behavior. --- target/xclk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/xclk.c b/target/xclk.c index cb67b677a5..7ee155b1fe 100755 --- a/target/xclk.c +++ b/target/xclk.c @@ -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;