diff options
author | Radomir Dopieralski <openstack@sheep.art.pl> | 2016-06-29 14:18:48 +0200 |
---|---|---|
committer | Radomir Dopieralski <openstack@sheep.art.pl> | 2016-06-30 18:18:50 +0200 |
commit | 35962eaab05bc4c1d17e4f0f568706ba8df4de51 (patch) | |
tree | c9c917434f34dd0f23b56616b0fb8a462f39084d /esp8266/uart.c | |
parent | d1b7ba5dc179570f2989d2eefabda4b4e9f6d8ae (diff) | |
download | micropython-35962eaab05bc4c1d17e4f0f568706ba8df4de51.tar.gz micropython-35962eaab05bc4c1d17e4f0f568706ba8df4de51.zip |
esp8266/modpybuart: allow setting baudrate and other params
Diffstat (limited to 'esp8266/uart.c')
-rw-r--r-- | esp8266/uart.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/esp8266/uart.c b/esp8266/uart.c index 1c317a1cb6..d724331c41 100644 --- a/esp8266/uart.c +++ b/esp8266/uart.c @@ -237,6 +237,12 @@ void ICACHE_FLASH_ATTR uart_reattach() { 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" |