From a250492c20f080e7a23f30821b57dae3ab5636ad Mon Sep 17 00:00:00 2001 From: Markus Sattler Date: Fri, 1 May 2015 14:58:48 +0200 Subject: [PATCH] disable debug on Serial.end() if debug on this interface. --- cores/esp8266/HardwareSerial.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cores/esp8266/HardwareSerial.cpp b/cores/esp8266/HardwareSerial.cpp index ad8766444..9bd3e35a8 100644 --- a/cores/esp8266/HardwareSerial.cpp +++ b/cores/esp8266/HardwareSerial.cpp @@ -510,6 +510,9 @@ void ICACHE_FLASH_ATTR HardwareSerial::begin(unsigned long baud, byte config) { } void ICACHE_FLASH_ATTR HardwareSerial::end() { + if(uart_get_debug() == _uart_nr) { + uart_set_debug(UART_NO); + } uart_uninit(_uart); delete _rx_buffer; delete _tx_buffer;