Creates and registers a Channel-based LED controller with runtime-configurable timing. Returns a shared_ptr handle for later inspection, reconfiguration, or removal. FastLED retains its own reference until remove(channel) is called.
auto channel =
FastLED.add(config);
CRGB * leds() FL_NO_EXCEPT
Get a pointer to led data for the first controller.
void fill_solid(CRGB *targetArray, int numToFill, const CRGB &color) FL_NO_EXCEPT
Fill a range of LEDs with a solid color.
CFastLED FastLED
Global LED strip management instance.
constexpr ChipsetTimingConfig makeTimingConfig() FL_NO_EXCEPT
Convert compile-time CHIPSET type to runtime timing config.
@ Red
<div style='background:#FF0000;width:4em;height:4em;'></div>
Configuration for a single LED channel.
817 {
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832 #ifndef FASTLED_SUPPRESS_RUNTIME_DRIVER_WARNING
833 FL_WARN_ONCE(
"FastLED.add(cfg): runtime-selection mode — enrolling every "
834 "available driver via fl::enableAllDrivers(). For minimum "
835 "binary size, prefer FastLED.addLeds<CHIPSET, PIN, ORDER, "
836 "fl::Bus::X>(leds, n) which links only the named driver. "
837 "Suppress this warning with -DFASTLED_SUPPRESS_RUNTIME_DRIVER_WARNING.");
838 #endif
840
843 "No channel drivers available - channel API requires at least one registered driver");
846 return channel;
847}
#define FL_ASSERT(x, MSG)
static void add(fl::ChannelPtr channel) FL_NO_EXCEPT
Add a Channel-based LED controller (from ChannelPtr)
static ChannelPtr create(const ChannelConfig &config) FL_NO_EXCEPT
Create a new channel with optional mBus driver pinning.
fl::size getDriverCount() const FL_NO_EXCEPT
Get count of registered drivers (including unnamed ones)
#define FL_WARN_ONCE(...)
void enableAllDrivers() FL_NO_EXCEPT
Register every channel driver available on this platform with ChannelManager, restoring 3....
ChannelManager & channelManager() FL_NO_EXCEPT
Get the global ChannelManager singleton instance.