FastLED 3.9.15
Loading...
Searching...
No Matches
thread_config.h
Go to the documentation of this file.
1#pragma once
2
9
10#include "fl/stl/has_include.h"
11
12// Platform-specific FASTLED_MULTITHREADED detection
13// Each platform defines this based on its threading capabilities
14
15#ifndef FASTLED_MULTITHREADED
16
17#if defined(FL_IS_STUB) || defined(FL_IS_WASM)
18 // Stub/WASM: Enable if pthread available
19 #if FL_HAS_INCLUDE(<pthread.h>)
20 #define FASTLED_MULTITHREADED 1
21 #else
22 #define FASTLED_MULTITHREADED 0
23 #endif
24#elif defined(FL_IS_ESP32)
25 // ESP32: FreeRTOS provides threading
26 #define FASTLED_MULTITHREADED 1
27#elif defined(FASTLED_TESTING) && FL_HAS_INCLUDE(<pthread.h>)
28 // Testing builds with pthread
29 #define FASTLED_MULTITHREADED 1
30#else
31 // Default: No threading support (AVR, STM32, Teensy, etc.)
32 #define FASTLED_MULTITHREADED 0
33#endif
34
35#endif // FASTLED_MULTITHREADED