Skip to content

Commit 3a110aa

Browse files
bryceschoberd-a-v
authored andcommitted
Allow other ESP debug port class types (#4611)
... by casting to void pointers before comparison to avoid compile error
1 parent b93cba1 commit 3a110aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/esp8266/HardwareSerial.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void HardwareSerial::begin(unsigned long baud, SerialConfig config, SerialMode m
4040
end();
4141
_uart = uart_init(_uart_nr, baud, (int) config, (int) mode, tx_pin, _rx_size);
4242
#if defined(DEBUG_ESP_PORT) && !defined(NDEBUG)
43-
if (this == &DEBUG_ESP_PORT)
43+
if (static_cast<void*>(this) == static_cast<void*>(&DEBUG_ESP_PORT))
4444
{
4545
setDebugOutput(true);
4646
println();

0 commit comments

Comments
 (0)