Skip to content

Commit 5954b23

Browse files
authored
feat(uart): reorganize Serial0 setup call to show in log_v within CDC
1 parent 6a512b1 commit 5954b23

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cores/esp32/main.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,19 @@ __attribute__((weak)) uint64_t getArduinoSetupWaitTime_ms(void) {
5050
}
5151

5252
void loopTask(void *pvParameters) {
53-
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)
54-
// sets UART0 (default console) RX/TX pins as already configured in boot or as defined in variants/pins_arduino.h
55-
Serial0.setPins(gpioNumberToDigitalPin(SOC_RX0), gpioNumberToDigitalPin(SOC_TX0));
56-
// time in ms that the sketch may wait before starting its execution - default is zero
57-
// usually done for opening the Serial Monitor and seeing all debug messages
5853
delay(getArduinoSetupWaitTime_ms());
59-
#endif
6054
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_DEBUG
6155
printBeforeSetupInfo();
6256
#else
6357
if (shouldPrintChipDebugReport()) {
6458
printBeforeSetupInfo();
6559
}
60+
#endif
61+
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)
62+
// sets UART0 (default console) RX/TX pins as already configured in boot or as defined in variants/pins_arduino.h
63+
Serial0.setPins(gpioNumberToDigitalPin(SOC_RX0), gpioNumberToDigitalPin(SOC_TX0));
64+
// time in ms that the sketch may wait before starting its execution - default is zero
65+
// usually done for opening the Serial Monitor and seeing all debug messages
6666
#endif
6767
setup();
6868
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_DEBUG

0 commit comments

Comments
 (0)