FastLED 3.10.6
Loading...
Searching...
No Matches

◆ makeClockless()

template<typename TIMING>
ClocklessChipset fl::makeClockless ( int pin)
constexpr

Build a ClocklessChipset from a compile-time TIMING trait.

Collapses the historical two-step pattern:

fl::ClocklessChipset chipset(PIN, timing);
#define PIN
Definition PinMode.ino:7
constexpr ChipsetTimingConfig makeTimingConfig() FL_NO_EXCEPT
Convert compile-time CHIPSET type to runtime timing config.
Clockless chipset configuration (single data pin)
Definition config.h:33

into a single expression:

constexpr ClocklessChipset makeClockless(int pin) FL_NO_EXCEPT
Build a ClocklessChipset from a compile-time TIMING trait.
Definition config.h:95

The encoder selector is extracted from the TIMING trait via encoder_for<>(): timings with a static ENCODER member (e.g., TIMING_UCS7604_800KHZ) yield that encoder; others default to CLOCKLESS_ENCODER_WS2812.

Template Parameters
TIMINGCompile-time chipset timing trait (e.g., TIMING_WS2812_800KHZ)
Parameters
pinGPIO data pin
Examples
/home/runner/work/FastLED/FastLED/src/fl/channels/config.h.

Definition at line 95 of file config.h.

95 {
97}
constexpr ClocklessEncoder encoder_for() FL_NO_EXCEPT
Extract the encoder selector from a compile-time TIMING type.

References encoder_for(), FL_NO_EXCEPT, and makeTimingConfig().

Referenced by fl::ChannelConfig::ChannelConfig(), and setup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: