|
FastLED 3.9.15
|
Centralized LED chipset timing definitions with nanosecond precision.
This file provides unified timing definitions for all supported LED chipsets using nanosecond-based T1, T2, T3 timing model (WS28xx three-phase protocol).
Timing Convention (per chipset): At T=0 : the line is raised hi to start a bit At T=T1 : the line is dropped low to transmit a zero bit (start of low time) At T=T1+T2 : the line is dropped low to transmit a one bit (start of low time) At T=T1+T2+T3 : the cycle is concluded (next bit can be sent)
All timings are specified in nanoseconds (ns) for clarity and portability. Platform-specific drivers convert these to CPU cycles as needed.
Definition in file led_timing.h.
Include dependency graph for led_timing.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| struct | fl::ChipsetTiming |
| Generic chipset timing entry Provides T1, T2, T3 timing parameters in nanoseconds for any LED protocol. More... | |
| struct | fl::TIMING_DP1903_400KHZ |
| DP1903 controller @ 400 kHz Four-phase: TH0=800ns, TH1=2400ns, TL0=2400ns, TL1=800ns. More... | |
| struct | fl::TIMING_DP1903_800KHZ |
| DP1903 controller @ 800 kHz Four-phase: TH0=400ns, TH1=1400ns, TL0=1400ns, TL1=400ns. More... | |
| struct | fl::TIMING_GE8822_800KHZ |
| GE8822 RGB controller @ 800 kHz Four-phase: TH0=350ns, TH1=1010ns, TL0=1010ns, TL1=350ns. More... | |
| struct | fl::TIMING_GW6205_400KHZ |
| GW6205 controller @ 400 kHz Four-phase: TH0=800ns, TH1=1600ns, TL0=1600ns, TL1=800ns. More... | |
| struct | fl::TIMING_GW6205_800KHZ |
| GW6205 controller @ 800 kHz (fast variant) Four-phase: TH0=400ns, TH1=800ns, TL0=800ns, TL1=400ns. More... | |
| struct | fl::TIMING_LPD1886_1250KHZ |
| LPD1886 RGB controller @ 1250 kHz Four-phase: TH0=200ns, TH1=600ns, TL0=600ns, TL1=200ns. More... | |
| struct | fl::TIMING_PL9823 |
| PL9823 RGB controller @ 800 kHz Four-phase: TH0=350ns, TH1=1360ns, TL0=1360ns, TL1=350ns. More... | |
| struct | fl::TIMING_SK6812 |
| SK6812 RGBW controller @ 800 kHz Four-phase: TH0=300ns, TH1=900ns, TL0=900ns, TL1=300ns. More... | |
| struct | fl::TIMING_SK6822 |
| SK6822 RGB controller @ 800 kHz Four-phase: TH0=375ns, TH1=1375ns, TL0=1375ns, TL1=375ns. More... | |
| struct | fl::TIMING_SM16703 |
| SM16703 RGB controller @ 800 kHz Four-phase: TH0=300ns, TH1=900ns, TL0=900ns, TL1=300ns. More... | |
| struct | fl::TIMING_SM16824E |
| SM16824E RGB controller (high-speed variant) Four-phase: TH0=300ns, TH1=1200ns, TL0=1000ns, TL1=100ns. More... | |
| struct | fl::TIMING_TM1803_400KHZ |
| TM1803 controller @ 400 kHz Four-phase: TH0=700ns, TH1=1800ns, TL0=1800ns, TL1=700ns. More... | |
| struct | fl::TIMING_TM1809_800KHZ |
| TM1809 RGB controller @ 800 kHz Four-phase: TH0=350ns, TH1=700ns, TL0=800ns, TL1=450ns. More... | |
| struct | fl::TIMING_TM1814 |
| TM1814 RGBW controller @ 800 kHz Four-phase: TH0=360ns, TH1=960ns, TL0=940ns, TL1=340ns. More... | |
| struct | fl::TIMING_TM1829_1600KHZ |
| TM1829 RGB controller @ 1600 kHz (high-speed variant) Four-phase: TH0=100ns, TH1=400ns, TL0=500ns, TL1=200ns. More... | |
| struct | fl::TIMING_TM1829_800KHZ |
| TM1829 RGB controller @ 800 kHz Four-phase: TH0=340ns, TH1=680ns, TL0=890ns, TL1=550ns. More... | |
| struct | fl::TIMING_UCS1903_400KHZ |
| UCS1903 controller @ 400 kHz Four-phase: TH0=500ns, TH1=2000ns, TL0=2000ns, TL1=500ns. More... | |
| struct | fl::TIMING_UCS1903B_800KHZ |
| UCS1903B controller @ 800 kHz Four-phase: TH0=400ns, TH1=850ns, TL0=900ns, TL1=450ns. More... | |
| struct | fl::TIMING_UCS1904_800KHZ |
| UCS1904 controller @ 800 kHz Four-phase: TH0=400ns, TH1=800ns, TL0=850ns, TL1=450ns. More... | |
| struct | fl::TIMING_UCS1912 |
| UCS1912 controller @ 800 kHz Four-phase: TH0=250ns, TH1=1250ns, TL0=1350ns, TL1=350ns. More... | |
| struct | fl::TIMING_UCS2903 |
| UCS2903 controller @ 800 kHz Four-phase: TH0=250ns, TH1=1000ns, TL0=1000ns, TL1=250ns. More... | |
| struct | fl::TIMING_UCS7604_1600KHZ |
| UCS7604 RGBW controller @ 1600 kHz (16-bit color depth, high-speed) Four-phase: TH0=200ns, TH1=400ns, TL0=425ns, TL1=225ns. More... | |
| struct | fl::TIMING_UCS7604_800KHZ |
| UCS7604 RGBW controller @ 800 kHz (16-bit color depth) Four-phase: TH0=400ns, TH1=800ns, TL0=850ns, TL1=450ns. More... | |
| struct | fl::TIMING_UCS7604_8BIT_800KHZ |
| UCS7604 RGBW controller @ 800 kHz (8-bit color depth) Same wire timing as 16-bit 800KHz, but uses 8-bit encoding mode. More... | |
| struct | fl::TIMING_WS2811_400KHZ |
| WS2811 @ 400kHz (standard mode, datasheet specification) More... | |
| struct | fl::TIMING_WS2811_800KHZ_LEGACY |
| WS2811 @ 800kHz (fast mode, half the timing of 400kHz mode) More... | |
| struct | fl::TIMING_WS2812_800KHZ |
| WS2812 RGB controller @ 800 kHz (most common, overclockable) Four-phase: TH0=250ns, TH1=875ns, TL0=1000ns, TL1=375ns. More... | |
| struct | fl::TIMING_WS2812_800KHZ_LEGACY |
| WS2812 RGB controller @ 800 kHz legacy variant Four-phase: TH0=320ns, TH1=640ns, TL0=960ns, TL1=640ns. More... | |
| struct | fl::TIMING_WS2812B_MINI_V3 |
| WS2812B-Mini-V3 / WS2812B-V5 RGB controller @ 800 kHz Four-phase: TH0=225ns, TH1=580ns, TL0=1000ns, TL1=645ns These newer variants share identical timing specifications with tighter tolerances. More... | |
| struct | fl::TIMING_WS2813 |
| WS2813 RGB controller (same timing as WS2812) Four-phase: TH0=320ns, TH1=640ns, TL0=960ns, TL1=640ns. More... | |
| struct | fl::TIMING_WS2815 |
| WS2815 RGB controller @ 400 kHz Four-phase: TH0=250ns, TH1=1340ns, TL0=1640ns, TL1=550ns. More... | |
Namespaces | |
| namespace | fl |
| Base definition for an LED controller. | |
Macros | |
| #define | FASTLED_OVERCLOCK 1.0 |
| #define | FASTLED_OVERCLOCK_SK6812 FASTLED_OVERCLOCK |
| #define | FASTLED_OVERCLOCK_SK6822 FASTLED_OVERCLOCK |
| #define | FASTLED_OVERCLOCK_WS2811 FASTLED_OVERCLOCK |
| #define | FASTLED_OVERCLOCK_WS2812 FASTLED_OVERCLOCK |
| #define | FASTLED_OVERCLOCK_WS2813 FASTLED_OVERCLOCK |
| #define | FASTLED_OVERCLOCK_WS2815 FASTLED_OVERCLOCK |
| #define | FASTLED_WS2812_T1 250 |
| #define | FASTLED_WS2812_T2 625 |
| #define | FASTLED_WS2812_T3 375 |
| #define | FASTLED_WS2812B_V5_T1 225 |
| #define | FASTLED_WS2812B_V5_T2 355 |
| #define | FASTLED_WS2812B_V5_T3 645 |
Typedefs | |
| using | fl::TIMING_WS2812B_V5 = TIMING_WS2812B_MINI_V3 |
| Convenience alias - WS2812B-V5 uses identical timing to Mini-V3. | |
| using | fl::WS2812ChipsetTiming = TIMING_WS2812_800KHZ |
| Convenience alias for WS2812 timing (commonly used name) | |
Functions | |
| constexpr u32 | fl::get_bit_period_ns (const ChipsetTiming &timing) FL_NOEXCEPT |
| Get total bit period (T1 + T2 + T3) in nanoseconds. | |
| const ChipsetTiming * | fl::get_timing_by_name (const char *name) FL_NOEXCEPT |
| Get timing by name (for dynamic lookup if needed) | |
| constexpr u32 | fl::get_timing_t1 (const ChipsetTiming &timing) FL_NOEXCEPT |
| Extract T1 (high time for bit 0) from timing constant. | |
| constexpr u32 | fl::get_timing_t2 (const ChipsetTiming &timing) FL_NOEXCEPT |
| Extract T2 (additional high time for bit 1) from timing constant. | |
| constexpr u32 | fl::get_timing_t3 (const ChipsetTiming &timing) FL_NOEXCEPT |
| Extract T3 (low tail duration) from timing constant. | |
| template<typename TIMING> | |
| constexpr ChipsetTiming | fl::to_runtime_timing () FL_NOEXCEPT |
| Convert enum-based timing type to runtime ChipsetTiming struct. | |