Skip to content

Commit bb6cced

Browse files
diylxywindowsair
authored andcommitted
fix(esp8266): correct UART port assignment for serial initialization
ESP8266 only supports UART1 as TX-only. Previously, the code attempted to use UART1 as RX and UART0 as TX, causing initialization failure. This commit swaps the UART ports, assigning UART1 as TX and UART0 as RX, resolving the issue. fix #83 and #92
1 parent 58d20f8 commit bb6cced

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main/uart_bridge.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
5454
#if (USE_UART_BRIDGE == 1)
5555

5656
#ifdef CONFIG_IDF_TARGET_ESP8266
57-
#define UART_BRIDGE_TX UART_NUM_0
58-
#define UART_BRIDGE_RX UART_NUM_1
57+
#define UART_BRIDGE_TX UART_NUM_1
58+
#define UART_BRIDGE_RX UART_NUM_0
5959
#elif defined CONFIG_IDF_TARGET_ESP32
6060
#define UART_BRIDGE_TX UART_NUM_2
6161
#define UART_BRIDGE_RX UART_NUM_2

0 commit comments

Comments
 (0)