From 92f046971100eee91e8f7e935ffcfdc324f511cb Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Mon, 13 Nov 2023 17:56:11 -0800 Subject: [PATCH] esp32/uart: Make compatible with sclk type change in ESP-IDF 5.3. This type changes when they add LP-UART support for the ESP32-C6 in the dev version of ESP-IDF 5.3. Signed-off-by: Trent Piepho --- ports/esp32/uart.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/esp32/uart.c b/ports/esp32/uart.c index e0c8141a89..b82a638a5b 100644 --- a/ports/esp32/uart.c +++ b/ports/esp32/uart.c @@ -50,7 +50,11 @@ STATIC void uart_irq_handler(void *arg); void uart_stdout_init(void) { uart_hal_context_t repl_hal = REPL_HAL_DEFN(); + #if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 3, 0) uart_sclk_t sclk; + #else + soc_module_clk_t sclk; + #endif uint32_t sclk_freq; uart_hal_get_sclk(&repl_hal, &sclk); // To restore SCLK after uart_hal_init() resets it