|
FastLED 3.9.15
|
Strongly-typed channel configuration with compile-time chipset family.
ChannelConfigOf<Chipset> is the Phase 3b (issue #2428) templated form of ChannelConfig. It carries the same payload as a ChannelConfig but encodes the chipset family (ClocklessChipset or SpiChipsetConfig) as a template parameter so that FastLED.add<Bus, Chipset>(cfg) can:
Chipset from the configuration without a runtime variant probe.static_assert that the named Bus supports Chipset at compile time via BusSupports<B, Chipset>.Implicit conversions to/from the non-template ChannelConfig preserve backward compatibility – existing Channel::create(cfg) callers and the non-template FastLED.add(cfg) overloads continue to work unchanged.
| Chipset | One of fl::ClocklessChipset or fl::SpiChipsetConfig. |
#include <config.h>
Collaboration diagram for fl::ChannelConfigOf< Chipset >:Public Member Functions | |
| ChannelConfigOf (const Chipset &chipset, fl::span< CRGB > leds, EOrder rgbOrder=RGB, const ChannelOptions &options=ChannelOptions()) FL_NOEXCEPT | |
| Construct from a typed chipset, LEDs span, and optional metadata. | |
| ChannelConfigOf (const fl::string &name, const Chipset &chipset, fl::span< CRGB > leds, EOrder rgbOrder=RGB, const ChannelOptions &options=ChannelOptions()) FL_NOEXCEPT | |
| Named-channel constructor. | |
| operator ChannelConfig () const FL_NOEXCEPT | |
Implicit conversion to the type-erased ChannelConfig so the existing non-template Channel::create() factory accepts a templated config without any per-call-site change. | |
| ChannelConfig | toErased () const FL_NOEXCEPT |
| Convenience: build the erased form by value (handy in templates where the implicit conversion is suppressed by overload rules). | |
Public Attributes | |
| Chipset | chipset |
| Typed chipset configuration. | |
| fl::span< CRGB > | mLeds |
| LED data span. | |
| fl::optional< fl::string > | mName |
Optional user-specified name. If unset, Channel auto-generates one. | |
| fl::ScreenMap | mScreenMap |
| Screen mapping (for JS canvas visualization). | |
| ChannelOptions | options |
| Optional channel settings (correction, temperature, dither, rgbw, affinity). | |
| EOrder | rgb_order = RGB |
| RGB channel ordering. | |