Creates and registers a Channel-based LED controller with runtime-configurable timing. Returns a shared_ptr for lifetime control - controller auto-removes on destruction.
auto channel =
FastLED.add(config);
channel.reset();
CFastLED FastLED
Global LED strip management instance.
CRGB * leds()
Get a pointer to led data for the first controller.
void fill_solid(CRGB *targetArray, int numToFill, const CRGB &color) FL_NOEXCEPT
Fill a range of LEDs with a solid color.
constexpr ChipsetTimingConfig makeTimingConfig() FL_NOEXCEPT
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.
616 {
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631 #ifndef FASTLED_SUPPRESS_RUNTIME_DRIVER_WARNING
632 FL_WARN_ONCE(
"FastLED.add(cfg): runtime-selection mode — enrolling every "
633 "available driver via fl::enableAllDrivers(). For minimum "
634 "binary size, prefer FastLED.addLeds<CHIPSET, PIN, ORDER, "
635 "fl::Bus::X>(leds, n) which links only the named driver. "
636 "Suppress this warning with -DFASTLED_SUPPRESS_RUNTIME_DRIVER_WARNING.");
637 #endif
639
642 "No channel drivers available - channel API requires at least one registered driver");
645 return channel;
646}
#define FL_ASSERT(x, MSG)
static void add(fl::ChannelPtr channel)
Add a Channel-based LED controller (from ChannelPtr)
static ChannelPtr create(const ChannelConfig &config)
Create a new channel with optional mBus driver pinning.
fl::size getDriverCount() const FL_NOEXCEPT
Get count of registered drivers (including unnamed ones)
ChannelManager & channelManager()
Get the global ChannelManager singleton instance.
void enableAllDrivers() FL_NOEXCEPT
Register every channel driver available on this platform with ChannelManager, restoring 3....