FastLED 3.10.8
Loading...
Searching...
No Matches

◆ init()

void CFastLED::init ( )

Initialize platform-specific subsystems.

Performs one-time initialization of platform-specific hardware and subsystems. This is called automatically on first use but can be called explicitly to ensure initialization happens at a predictable time.

Safe to call multiple times - subsequent calls are no-ops.

Platform-specific initialization:

  • ESP32: Initializes channel bus manager (PARLIO/SPI/RMT/UART) and SPI bus manager
  • Other platforms: No-op (no initialization required)

Definition at line 129 of file FastLED.cpp.hpp.

129 {
130 // Call platform-specific initialization once
131 // Uses the trampoline pattern: platforms/init.h dispatches to platform-specific headers
132 // FL_RUN_ONCE ensures this is only called once, even if init() is called multiple times
133 FL_RUN_ONCE(fl::platforms::init());
134}
#define FL_RUN_ONCE(code)

References FL_NO_EXCEPT, and FL_RUN_ONCE.