Skip to content

Commit e816302

Browse files
committed
Fix Serial::setDebugOutput(true) not replacing the default function
1 parent 97eea6c commit e816302

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

cores/esp32/esp32-hal-uart.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -368,13 +368,9 @@ void uartSetDebug(uart_t* uart)
368368
{
369369
if(uart == NULL || uart->num >= SOC_UART_NUM) {
370370
s_uart_debug_nr = -1;
371-
//ets_install_putc1(NULL);
372-
//return;
373-
} else
374-
if(s_uart_debug_nr == uart->num) {
375-
return;
376-
} else
377-
s_uart_debug_nr = uart->num;
371+
} else {
372+
s_uart_debug_nr = uart->num;
373+
}
378374
uart_install_putc();
379375
}
380376

0 commit comments

Comments
 (0)