Skip to content

Commit 35aacac

Browse files
committed
enforces Serial0 setPins
1 parent f7483ea commit 35aacac

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

cores/esp32/HardwareSerial.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,6 @@ _eventTask(NULL)
107107
}
108108
}
109109
#endif
110-
// sets UART0 (default console) RX/TX pins as already configured in boot
111-
if (uart_nr == 0) {
112-
setPins(SOC_RX0, SOC_TX0);
113-
}
114110
// set deinit function in the Peripheral Manager
115111
uart_init_PeriMan();
116112
}

cores/esp32/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ __attribute__((weak)) bool shouldPrintChipDebugReport(void) {
4545

4646
void loopTask(void *pvParameters)
4747
{
48+
// sets UART0 (default console) RX/TX pins as already configured in boot or as defined in variants/pins_arduino.h
49+
Serial0.setPins(SOC_RX0, SOC_TX0);
4850
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_DEBUG
4951
printBeforeSetupInfo();
5052
#else

0 commit comments

Comments
 (0)