MCPcopy Create free account
hub / github.com/dalathegreat/Battery-Emulator / init_serial

Function init_serial

Software/Software.cpp:68–83  ·  view source on GitHub ↗

Initialization functions

Source from the content-addressed store, hash-verified

66
67// Initialization functions
68void init_serial() {
69 // Init Serial monitor
70 Serial.begin(115200);
71#if (HW_LILYGO2CAN || HW_BECOM || HW_WAVESHARE)
72 // Wait up to 100ms for Serial to be available. On the ESP32S3 Serial is
73 // provided by the USB controller, so will only work if the board is connected
74 // to a computer.
75 for (int i = 0; i < 10; i++) {
76 if (Serial)
77 break;
78 delay(10);
79 }
80#else
81 while (!Serial) {}
82#endif
83}
84
85void connectivity_loop(void*) {
86 esp_task_wdt_add(NULL); // Register this task with WDT

Callers 1

setupFunction · 0.85

Calls 2

delayFunction · 0.85
beginMethod · 0.45

Tested by

no test coverage detected