From 063bc7e5f1bc655cd39b543156e05e11a58dedd9 Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 1 Feb 2021 09:06:35 +0000 Subject: [PATCH] Fix bug in `smg_uart_set_tx()` (#2210) Sets pin on wrong uart --- Sming/Arch/Esp8266/Components/driver/uart.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sming/Arch/Esp8266/Components/driver/uart.cpp b/Sming/Arch/Esp8266/Components/driver/uart.cpp index e6c50b94fc..22114d3818 100644 --- a/Sming/Arch/Esp8266/Components/driver/uart.cpp +++ b/Sming/Arch/Esp8266/Components/driver/uart.cpp @@ -910,9 +910,9 @@ void smg_uart_swap(smg_uart_t* uart, int tx_pin) bool smg_uart_set_tx(smg_uart_t* uart, int tx_pin) { if(uart != nullptr && uart->uart_nr == UART0 && smg_uart_tx_enabled(uart)) { - uart1_pin_restore(uart->tx_pin); + uart0_pin_restore(uart->tx_pin); uart->tx_pin = (tx_pin == 2) ? 2 : 1; - uart1_pin_select(uart->tx_pin); + uart0_pin_select(uart->tx_pin); return true; }