1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Revert "Revert "disable debug on Serial.end() if debug on this interface.""

This reverts commit b2d41697340ca11273c9a66b13a6c1f0d1d9bcc2.
This commit is contained in:
ficeto 2015-05-01 16:15:58 +03:00
parent bbba691cac
commit 66ded562f3

View File

@ -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;