Initialization functions
| 66 | |
| 67 | // Initialization functions |
| 68 | void 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 | |
| 85 | void connectivity_loop(void*) { |
| 86 | esp_task_wdt_add(NULL); // Register this task with WDT |