Serial initialization
| 14 | |
| 15 | // Serial initialization |
| 16 | void begin(u32 baudRate) FL_NOEXCEPT { |
| 17 | Serial.begin(baudRate); |
| 18 | #if defined(ARDUINO_USB_CDC_ON_BOOT) && ARDUINO_USB_CDC_ON_BOOT |
| 19 | // ESP32 HWCDC/USBCDC: make writes drop instead of block when no host is reading. |
| 20 | // Default is 100ms (HWCDC) / 250ms (USBCDC). Setting to 0 collapses worst-case |
| 21 | // stall from ~2s to ~0 when host absent. See FastLED issue #2668 and |
| 22 | // arduino-esp32 PR #7583. Safe to call on any Serial that exposes the method. |
| 23 | Serial.setTxTimeoutMs(0); |
| 24 | #endif |
| 25 | } |
| 26 | |
| 27 | // Print functions |
| 28 | void print(const char* str) FL_NOEXCEPT { |