Add multiple LED channels from a MultiChannelConfig.
Creates and registers multiple Channel-based LED controllers from a MultiChannelConfig. Returns a vector of shared_ptrs for lifetime control.
- Parameters
-
| multiConfig | MultiChannelConfig containing multiple channel configurations |
- Returns
- Vector of ChannelPtrs (one per config), or empty elements if unsupported
- Note
- Supported platforms: ESP32, ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6, ESP32-P4
Example:
};
CRGB leds2[lengths[RedStrip]]
CRGB leds1[lengths[GreenStrip]]
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
static fl::vector< fl::ChannelPtr > & channels()
stored ChannelPtrs to keep them alive
constexpr ChipsetTimingConfig makeTimingConfig() FL_NOEXCEPT
Convert compile-time CHIPSET type to runtime timing config.
Configuration for a single LED channel.
Definition at line 670 of file FastLED.cpp.hpp.
670 {
671 fl::vector<fl::ChannelPtr>
channels;
673
674 for (
const auto& configPtr : multiConfig.
mChannels) {
675 if (configPtr) {
677 }
678 }
679
681}
static void add(fl::ChannelPtr channel)
Add a Channel-based LED controller (from ChannelPtr)
fl::size size() const FL_NOEXCEPT
fl::vector< ChannelConfigPtr > mChannels
Vector of shared pointers to channel configurations.
References add(), channels(), fl::MultiChannelConfig::mChannels, and fl::vector_basic::size().