From 3a110aa698dd17e0d80704db47c8e43c986b0f86 Mon Sep 17 00:00:00 2001 From: Bryce Schober Date: Fri, 6 Apr 2018 02:23:46 -0700 Subject: [PATCH] Allow other ESP debug port class types (#4611) ... by casting to void pointers before comparison to avoid compile error --- cores/esp8266/HardwareSerial.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/esp8266/HardwareSerial.cpp b/cores/esp8266/HardwareSerial.cpp index 4eb2366fa..416aa73c4 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();