commit | 35962eaab05bc4c1d17e4f0f568706ba8df4de51 | [log] [tgz] |
---|---|---|
author | Radomir Dopieralski <openstack@sheep.art.pl> | Wed Jun 29 14:18:48 2016 +0200 |
committer | Radomir Dopieralski <openstack@sheep.art.pl> | Thu Jun 30 18:18:50 2016 +0200 |
tree | c9c917434f34dd0f23b56616b0fb8a462f39084d | |
parent | d1b7ba5dc179570f2989d2eefabda4b4e9f6d8ae [diff] [blame] |
esp8266/modpybuart: allow setting baudrate and other params
diff --git a/esp8266/uart.c b/esp8266/uart.c index 1c317a1..d724331 100644 --- a/esp8266/uart.c +++ b/esp8266/uart.c
@@ -237,6 +237,12 @@ uart_init(UART_BIT_RATE_74880, UART_BIT_RATE_74880); } +void ICACHE_FLASH_ATTR uart_setup(uint8 uart) { + ETS_UART_INTR_DISABLE(); + uart_config(uart); + ETS_UART_INTR_ENABLE(); +} + // Task-based UART interface #include "py/obj.h"