From 02463d4d1ea31a1869a61f77ffd49b4e704bc5ec Mon Sep 17 00:00:00 2001 From: Andrea Milazzo Date: Tue, 12 Mar 2024 09:46:12 +0100 Subject: [PATCH] esp32/esp32c6: Add support for LP_UART. Signed-off-by: Andrew Leech --- ports/esp32/machine_uart.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ports/esp32/machine_uart.c b/ports/esp32/machine_uart.c index 50c9a19bef..e82267bcad 100644 --- a/ports/esp32/machine_uart.c +++ b/ports/esp32/machine_uart.c @@ -358,12 +358,18 @@ static mp_obj_t mp_machine_uart_make_new(const mp_obj_type_t *type, size_t n_arg self->rx = 9; self->tx = 10; break; - #if SOC_UART_NUM > 2 + #if SOC_UART_HP_NUM > 2 case UART_NUM_2: self->rx = 16; self->tx = 17; break; #endif + #if (SOC_UART_LP_NUM >= 1) + case LP_UART_NUM_0: + self->rx = 4; + self->tx = 5; + #endif + } #if MICROPY_HW_ENABLE_UART_REPL