Skip to content

Commit 602305b

Browse files
committed
esp8266/uart: Properly initialise UART0 RXD pin in uart_config.
Tested and seems to work. See adafruit#1995.
1 parent 6707fc9 commit 602305b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

esp8266/uart.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
#include "user_interface.h"
2020
#include "esp_mphal.h"
2121

22+
// seems that this is missing in the Espressif SDK
23+
#define FUNC_U0RXD 0
24+
2225
#define UART_REPL UART0
2326

2427
// UartDev is defined and initialized in rom code.
@@ -53,7 +56,7 @@ static void ICACHE_FLASH_ATTR uart_config(uint8 uart_no) {
5356
ETS_UART_INTR_ATTACH(uart0_rx_intr_handler, NULL);
5457
PIN_PULLUP_DIS(PERIPHS_IO_MUX_U0TXD_U);
5558
PIN_FUNC_SELECT(PERIPHS_IO_MUX_U0TXD_U, FUNC_U0TXD);
56-
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDO_U, FUNC_U0RTS);
59+
PIN_FUNC_SELECT(PERIPHS_IO_MUX_U0RXD_U, FUNC_U0RXD);
5760
}
5861

5962
uart_div_modify(uart_no, UART_CLK_FREQ / (UartDev.baut_rate));

0 commit comments

Comments
 (0)