diff options
author | Damien George <damien.p.george@gmail.com> | 2016-05-29 10:30:27 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-05-29 10:30:27 +0100 |
commit | 602305b211f453f5cbcc6baa76e2aaddec0a1d6a (patch) | |
tree | 1b1f1bc6afd7e6110adfead6fb0c5431d0eb9f93 /esp8266/uart.c | |
parent | 6707fc94ae1b3b4227c514109b31c2e2eaba67e8 (diff) |
esp8266/uart: Properly initialise UART0 RXD pin in uart_config.
Tested and seems to work. See #1995.
Diffstat (limited to 'esp8266/uart.c')
-rw-r--r-- | esp8266/uart.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/esp8266/uart.c b/esp8266/uart.c index 573f0cb07..1c317a1cb 100644 --- a/esp8266/uart.c +++ b/esp8266/uart.c @@ -19,6 +19,9 @@ #include "user_interface.h" #include "esp_mphal.h" +// seems that this is missing in the Espressif SDK +#define FUNC_U0RXD 0 + #define UART_REPL UART0 // UartDev is defined and initialized in rom code. @@ -53,7 +56,7 @@ static void ICACHE_FLASH_ATTR uart_config(uint8 uart_no) { ETS_UART_INTR_ATTACH(uart0_rx_intr_handler, NULL); PIN_PULLUP_DIS(PERIPHS_IO_MUX_U0TXD_U); PIN_FUNC_SELECT(PERIPHS_IO_MUX_U0TXD_U, FUNC_U0TXD); - PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDO_U, FUNC_U0RTS); + PIN_FUNC_SELECT(PERIPHS_IO_MUX_U0RXD_U, FUNC_U0RXD); } uart_div_modify(uart_no, UART_CLK_FREQ / (UartDev.baut_rate)); |