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

Function run_example

tests/shared/example_dll_main.hpp:16–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14extern "C" {
15#ifdef _WIN32
16 __declspec(dllexport)
17#else
18 __attribute__((visibility("default")))
19#endif
20 int run_example(int argc, const char** argv) {
21 (void)argc; // Suppress unused parameter warning
22 (void)argv; // Examples don't typically use command-line args
23
24 // Scoped cleanup - destructor calls EngineEvents::onExit() automatically
25 fl::stub_main::ScopedEngineCleanup cleanup;
26
27 // Run setup() once, then loop() until next_loop() returns false
28 fl::stub_main::setup();
29 while (fl::stub_main::next_loop()) {
30 // Loop continues based on FASTLED_STUB_MAIN_FAST_EXIT
31 }
32
33 return 0; // cleanup destructor called here
34 }
35}

Callers 3

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 2

next_loopFunction · 0.85
setupFunction · 0.70

Tested by

no test coverage detected