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

Function init

src/platforms/wasm/init_wasm.cpp.hpp:30–49  ·  view source on GitHub ↗

@brief Initialize WebAssembly platform Performs one-time initialization of WASM-specific subsystems. This function uses a static flag to ensure initialization happens only once.

Source from the content-addressed store, hash-verified

28/// Performs one-time initialization of WASM-specific subsystems.
29/// This function uses a static flag to ensure initialization happens only once.
30void init() {
31 static bool initialized = false;
32
33 if (initialized) {
34 return; // Already initialized
35 }
36
37 FL_DBG("WASM: Platform initialization starting");
38
39 // Initialize driver listener system
40 // This connects FastLED driver events to the JavaScript runtime
41 EngineListener::Init();
42
43 // Initialize channel drivers for WASM platform
44 // This registers the stub driver with ChannelManager
45 platforms::initChannelDrivers();
46
47 initialized = true;
48 FL_DBG("WASM: Platform initialization complete");
49}
50
51} // namespace platforms
52} // namespace fl

Callers 1

stub_main.hppFile · 0.50

Calls 1

initChannelDriversFunction · 0.70

Tested by

no test coverage detected