Skip to content

Commit 28a868d

Browse files
committed
disable debug on Serial.end() if debug on this interface.
1 parent 0b14e44 commit 28a868d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hardware/esp8266com/esp8266/cores/esp8266/HardwareSerial.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,9 @@ void ICACHE_FLASH_ATTR HardwareSerial::begin(unsigned long baud, byte config) {
510510
}
511511

512512
void ICACHE_FLASH_ATTR HardwareSerial::end() {
513+
if(uart_get_debug() == _uart_nr) {
514+
uart_set_debug(UART_NO);
515+
}
513516
uart_uninit(_uart);
514517
delete _rx_buffer;
515518
delete _tx_buffer;

0 commit comments

Comments
 (0)