FastLED 3.10.10
Loading...
Searching...
No Matches

◆ add() [3/11]

template<fl::Bus B, typename Chipset = fl::ClocklessChipset, fl::u8 Which = 0>
static fl::ChannelPtr CFastLED::add ( const fl::ChannelConfig & config)
inlinestatic

Add a channel through one compile-time-selected driver (#4733).

Bus::AUTO resolves to the platform default for Chipset. This path registers only that driver instead of the runtime all-driver bundle. Chipset defaults to ClocklessChipset for an erased ChannelConfig; pass SpiChipsetConfig explicitly for an erased clocked configuration. A chipset-family mismatch returns nullptr without registering anything.

Definition at line 853 of file FastLED.h.

853 {
854 fl::ChannelPtr channel = fl::TypedChannel<B, Chipset, Which>::create(config);
855 if (channel != nullptr) add(channel);
856 return channel;
857 }
static void add(fl::ChannelPtr channel) FL_NO_EXCEPT
Add a Channel-based LED controller (from ChannelPtr)
static ChannelPtr create(const ChannelConfigOf< Chipset > &cfg) FL_NO_EXCEPT
Construct a runtime Channel from a typed configuration.

References add(), fl::TypedChannel< B, Chipset, Which >::create(), and FL_NO_EXCEPT.

+ Here is the call graph for this function: