added emsuart_stop()

This commit is contained in:
proddy
2019-01-02 12:40:10 +01:00
parent 1c4fff2c84
commit f15aa9508d
2 changed files with 10 additions and 1 deletions

View File

@@ -137,6 +137,14 @@ void ICACHE_FLASH_ATTR emsuart_init() {
system_uart_swap();
}
/*
* stop UART0 driver
*/
void ICACHE_FLASH_ATTR emsuart_stop() {
ETS_UART_INTR_DISABLE();
ETS_UART_INTR_ATTACH(NULL, NULL);
}
/*
* Send a BRK signal
* Which is a 11-bit set of zero's (11 cycles)

View File

@@ -28,6 +28,7 @@ typedef struct {
} _EMSRxBuf;
void ICACHE_FLASH_ATTR emsuart_init();
void ICACHE_FLASH_ATTR emsuart_stop();
void ICACHE_FLASH_ATTR emsuart_tx_buffer(uint8_t * buf, uint8_t len);
void ICACHE_FLASH_ATTR emsaurt_tx_poll();
void ICACHE_FLASH_ATTR emsuart_tx_brk();