summaryrefslogtreecommitdiff
path: root/ports/esp32/uart.c
diff options
context:
space:
mode:
authorTrent Piepho <tpiepho@gmail.com>2023-11-13 17:56:11 -0800
committerDamien George <damien@micropython.org>2023-11-23 11:51:06 +1100
commit92f046971100eee91e8f7e935ffcfdc324f511cb (patch)
tree91925b84740f3a59ba8b43c29ebd88dcdd6339c9 /ports/esp32/uart.c
parentf72a7dde18600379471189b6727bb65bd2834519 (diff)
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 <tpiepho@gmail.com>
Diffstat (limited to 'ports/esp32/uart.c')
-rw-r--r--ports/esp32/uart.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ports/esp32/uart.c b/ports/esp32/uart.c
index e0c8141a8..b82a638a5 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