Skip to content

Commit 3a3853c

Browse files
feat(core): Add wait time before setup
Added initialization time for UART, etc. Default value is 0.
1 parent 6f92b60 commit 3a3853c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cores/esp32/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,15 @@ __attribute__((weak)) bool shouldPrintChipDebugReport(void) {
4444
return false;
4545
}
4646

47+
__attribute__((weak)) uint64_t getArduinoSetupWaitTick(void) {
48+
return 0;
49+
}
50+
4751
void loopTask(void *pvParameters) {
4852
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)
4953
// sets UART0 (default console) RX/TX pins as already configured in boot or as defined in variants/pins_arduino.h
5054
Serial0.setPins(gpioNumberToDigitalPin(SOC_RX0), gpioNumberToDigitalPin(SOC_TX0));
55+
vTaskDelay(getArduinoSetupWaitTick());
5156
#endif
5257
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_DEBUG
5358
printBeforeSetupInfo();

0 commit comments

Comments
 (0)