FastLED 3.9.15
Loading...
Searching...
No Matches
fl::ChannelConfig Struct Reference

Detailed Description

Configuration for a single LED channel.

Contains all settings typically configured via FastLED.addLeds<>().set...() methods:

  • LED data array and count
  • Chipset configuration (clockless or SPI)
  • Color correction and temperature
  • Dithering mode
  • RGBW conversion settings
Examples
Sailboat.ino.

Definition at line 163 of file config.h.

#include <config.h>

+ Collaboration diagram for fl::ChannelConfig:

Public Member Functions

 ChannelConfig (ChannelConfig &&other) FL_NOEXCEPT
 
 ChannelConfig (const ChannelConfig &other) FL_NOEXCEPT
 
 ChannelConfig (const ChipsetVariant &chipset, fl::span< CRGB > leds, EOrder rgbOrder=RGB, const ChannelOptions &options=ChannelOptions()) FL_NOEXCEPT
 Primary constructor with chipset variant.
 
 ChannelConfig (const ClocklessChipset &clockless, fl::span< CRGB > leds, EOrder rgbOrder=RGB, const ChannelOptions &options=ChannelOptions()) FL_NOEXCEPT
 Constructor with clockless chipset.
 
 ChannelConfig (const fl::string &name, const ChipsetVariant &chipset, fl::span< CRGB > leds, EOrder rgbOrder=RGB, const ChannelOptions &options=ChannelOptions()) FL_NOEXCEPT
 Named constructor with chipset variant.
 
 ChannelConfig (const SpiChipsetConfig &spi, fl::span< CRGB > leds, EOrder rgbOrder=RGB, const ChannelOptions &options=ChannelOptions()) FL_NOEXCEPT
 Constructor with SPI chipset.
 
 ChannelConfig (int pin, const ChipsetTimingConfig &timing, fl::span< CRGB > leds, EOrder rgbOrder=RGB, const ChannelOptions &options=ChannelOptions()) FL_NOEXCEPT
 Basic constructor with timing (backwards compatibility)
 
template<typename TIMING>
 ChannelConfig (int pin, fl::span< CRGB > leds, EOrder rgbOrder=RGB, const ChannelOptions &options=ChannelOptions()) FL_NOEXCEPT
 Template constructor with TIMING type (backwards compatibility)
 
const ChipsetVariantgetChipset () const FL_NOEXCEPT
 Get the chipset configuration variant.
 
const ClocklessChipsetgetClocklessChipset () const FL_NOEXCEPT
 Get clockless chipset (returns nullptr if not clockless)
 
int getClockPin () const FL_NOEXCEPT
 Get clock pin (returns -1 for clockless chipsets)
 
int getDataPin () const FL_NOEXCEPT
 Get data pin (works for both clockless and SPI)
 
const fl::ScreenMapgetScreenMap () const FL_NOEXCEPT
 Get screen map for JS canvas visualization.
 
const SpiChipsetConfiggetSpiChipset () const FL_NOEXCEPT
 Get SPI chipset (returns nullptr if not SPI)
 
bool hasScreenMap () const FL_NOEXCEPT
 Check if screen map is configured.
 
bool isClockless () const FL_NOEXCEPT
 Check if this is a clockless chipset.
 
bool isSpi () const FL_NOEXCEPT
 Check if this is an SPI chipset.
 
ChannelConfigoperator= (ChannelConfig &&) FL_NOEXCEPT=delete
 
ChannelConfigoperator= (const ChannelConfig &) FL_NOEXCEPT=delete
 
void setScreenMap (const fl::ScreenMap &map) FL_NOEXCEPT
 Set screen map for JS canvas visualization.
 

Public Attributes

ChipsetVariant chipset
 Chipset configuration (clockless or SPI)
 
fl::span< CRGBmLeds
 LED data array.
 
fl::optional< fl::stringmName
 Optional user-specified name (if not set, Channel generates one automatically)
 
fl::ScreenMap mScreenMap
 Screen mapping.
 
ChannelOptions options
 Optional channel settings (correction, temperature, dither, rgbw, affinity)
 
EOrder rgb_order = RGB
 RGB channel ordering.
 

The documentation for this struct was generated from the following files: