Skip to content

Commit a250492

Browse files
committed
disable debug on Serial.end() if debug on this interface.
1 parent d4e6561 commit a250492

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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)