diff --git a/cores/esp8266/HardwareSerial.cpp b/cores/esp8266/HardwareSerial.cpp index 4eb2366fa5..416aa73c43 100644 --- a/cores/esp8266/HardwareSerial.cpp +++ b/cores/esp8266/HardwareSerial.cpp @@ -40,7 +40,7 @@ void HardwareSerial::begin(unsigned long baud, SerialConfig config, SerialMode m end(); _uart = uart_init(_uart_nr, baud, (int) config, (int) mode, tx_pin, _rx_size); #if defined(DEBUG_ESP_PORT) && !defined(NDEBUG) - if (this == &DEBUG_ESP_PORT) + if (static_cast(this) == static_cast(&DEBUG_ESP_PORT)) { setDebugOutput(true); println();