MCPcopy Create free account
hub / github.com/FastLED/FastLED / begin

Function begin

src/platforms/arduino/io_arduino.hpp:16–25  ·  view source on GitHub ↗

Serial initialization

Source from the content-addressed store, hash-verified

14
15// Serial initialization
16void 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
28void print(const char* str) FL_NOEXCEPT {

Callers

nothing calls this directly

Calls 1

beginMethod · 0.45

Tested by

no test coverage detected