65 return pin == other.pin &&
72 return !(*
this == other);
94template <
typename TIMING>
132 return dataPin == other.dataPin &&
140 return !(*
this == other);
209 template<
typename TIMING>
306template<
typename Chipset>
326 if (
mName.has_value()) {
Runtime chipset timing configuration for clockless LED drivers.
SPI encoder configuration for clocked LED chipsets.
Encoding pipeline selector for clockless LED chipsets.
Declares dithering options and types.
Functions for red, green, blue, white (RGBW) output.
constexpr T * end(T(&array)[N]) FL_NO_EXCEPT
constexpr T * begin(T(&array)[N]) FL_NO_EXCEPT
Esp32SpiBus
ESP-IDF SPI host selection for an individual clocked LED controller.
u8 u8 fract8 blur_amount FL_NO_EXCEPT
ClocklessEncoder
Identifies which encoder to use for clockless chipsets in the Channel API.
@ CLOCKLESS_ENCODER_WS2812
Default, no preamble (WS2812 and compatible)
constexpr ChipsetTimingConfig makeTimingConfig() FL_NO_EXCEPT
Convert compile-time CHIPSET type to runtime timing config.
MapRedBlackTree< Key, T, Compare, fl::allocator_slab< char > > map
fl::variant< ClocklessChipset, SpiChipsetConfig > ChipsetVariant
EOrder
RGB color channel orderings, used when instantiating controllers to determine what order the controll...
constexpr ClocklessEncoder encoder_for() FL_NO_EXCEPT
Extract the encoder selector from a compile-time TIMING type.
constexpr ClocklessChipset makeClockless(int pin) FL_NO_EXCEPT
Build a ClocklessChipset from a compile-time TIMING trait.
@ APA102
APA102 LED chipset.
Base definition for an LED controller.
#define FASTLED_SHARED_PTR_STRUCT(type)
void setScreenMap(const fl::ScreenMap &map) FL_NO_EXCEPT
Set screen map for JS canvas visualization.
bool isClockless() const FL_NO_EXCEPT
Check if this is a clockless chipset.
ChannelConfig(const fl::string &name, const ChipsetVariant &chipset, fl::span< CRGB > leds, EOrder rgbOrder=RGB, const ChannelOptions &options=ChannelOptions()) FL_NO_EXCEPT
Named constructor with chipset variant.
fl::optional< fl::string > mName
Optional user-specified name (if not set, Channel generates one automatically)
int getDataPin() const FL_NO_EXCEPT
Get data pin (works for both clockless and SPI)
const SpiChipsetConfig * getSpiChipset() const FL_NO_EXCEPT
Get SPI chipset (returns nullptr if not SPI)
const fl::ScreenMap & getScreenMap() const FL_NO_EXCEPT
Get screen map for JS canvas visualization.
int getClockPin() const FL_NO_EXCEPT
Get clock pin (returns -1 for clockless chipsets)
const ChipsetVariant & getChipset() const FL_NO_EXCEPT
Get the chipset configuration variant.
fl::ScreenMap mScreenMap
Screen mapping.
bool isSpi() const FL_NO_EXCEPT
Check if this is an SPI chipset.
bool hasScreenMap() const FL_NO_EXCEPT
Check if screen map is configured.
ChannelOptions options
Optional channel settings (correction, temperature, dither, rgbw, affinity)
fl::span< CRGB > mLeds
LED data array.
ChannelConfig(int pin, fl::span< CRGB > leds, EOrder rgbOrder=RGB, const ChannelOptions &options=ChannelOptions()) FL_NO_EXCEPT
Template constructor with TIMING type (backwards compatibility)
const ClocklessChipset * getClocklessChipset() const FL_NO_EXCEPT
Get clockless chipset (returns nullptr if not clockless)
ChipsetVariant chipset
Chipset configuration (clockless or SPI)
EOrder rgb_order
RGB channel ordering.
Configuration for a single LED channel.
fl::ScreenMap mScreenMap
Screen mapping (for JS canvas visualization).
ChannelConfigOf(const Chipset &chipset, fl::span< CRGB > leds, EOrder rgbOrder=RGB, const ChannelOptions &options=ChannelOptions()) FL_NO_EXCEPT
Construct from a typed chipset, LEDs span, and optional metadata.
fl::span< CRGB > mLeds
LED data span.
ChannelOptions options
Optional channel settings (correction, temperature, dither, rgbw, affinity).
fl::optional< fl::string > mName
Optional user-specified name. If unset, Channel auto-generates one.
EOrder rgb_order
RGB channel ordering.
Chipset chipset
Typed chipset configuration.
ChannelConfigOf(const fl::string &name, const Chipset &chipset, fl::span< CRGB > leds, EOrder rgbOrder=RGB, const ChannelOptions &options=ChannelOptions()) FL_NO_EXCEPT
Named-channel constructor.
ChannelConfig toErased() const FL_NO_EXCEPT
Convenience: build the erased form by value (handy in templates where the implicit conversion is supp...
Optional channel configuration parameters All fields have sensible defaults and can be overridden as ...
Runtime bit-period timing for a clockless chipset.
ChipsetTimingConfig timing
T1/T2/T3 timing parameters.
bool operator!=(const ClocklessChipset &other) const FL_NO_EXCEPT
Inequality operator.
ClocklessChipset(ClocklessChipset &&) FL_NO_EXCEPT=default
Move constructor.
ClocklessChipset(const ClocklessChipset &) FL_NO_EXCEPT=default
Copy constructor.
constexpr ClocklessChipset() FL_NO_EXCEPT
Default constructor.
ClocklessEncoder encoder
Byte-level encoding pipeline (default: WS2812)
constexpr ClocklessChipset(int pin, const ChipsetTimingConfig &timing, ClocklessEncoder encoder) FL_NO_EXCEPT
Constructor with explicit encoder.
constexpr ClocklessChipset(int pin, const ChipsetTimingConfig &timing) FL_NO_EXCEPT
Constructor (encoder defaults to WS2812)
Clockless chipset configuration (single data pin)
MultiChannelConfig & operator=(const MultiChannelConfig &) FL_NO_EXCEPT=default
MultiChannelConfig & add(ChannelConfigPtr channel) FL_NO_EXCEPT
Add a channel configuration to the multi-channel config.
fl::vector< ChannelConfigPtr > mChannels
Vector of shared pointers to channel configurations.
MultiChannelConfig() FL_NO_EXCEPT=default
MultiChannelConfig(fl::initializer_list< ChannelConfigPtr > channels) FL_NO_EXCEPT
MultiChannelConfig & operator=(MultiChannelConfig &&) FL_NO_EXCEPT=default
SpiEncoder timing
SPI encoder configuration.
SpiChipsetConfig(int dataPin, int clockPin, const SpiEncoder &timing, Esp32SpiBus spiBus=Esp32SpiBus::AUTO) FL_NO_EXCEPT
Constructor.
bool operator!=(const SpiChipsetConfig &other) const FL_NO_EXCEPT
Inequality operator.
SpiChipsetConfig() FL_NO_EXCEPT
Default constructor (requires explicit protocol specification)
Esp32SpiBus spiBus
ESP-IDF host override, or AUTO.
SpiChipsetConfig(const SpiChipsetConfig &) FL_NO_EXCEPT=default
Copy constructor.
int clockPin
GPIO clock pin (SCK)
int dataPin
GPIO data pin (MOSI)
SpiChipsetConfig(SpiChipsetConfig &&) FL_NO_EXCEPT=default
Move constructor.
SPI chipset configuration (data + clock pins)
SPI encoder configuration for LED protocols.