FastLED 3.10.8
Loading...
Searching...
No Matches
channel.h
Go to the documentation of this file.
1
12
13#pragma once
14
15#include "fl/stl/noexcept.h"
16
18#include "fl/channels/bus.h"
20#include "fl/channels/options.h"
21#include "fl/gfx/pipeline.h"
22#include "fl/stl/unique_ptr.h"
23#include "fl/stl/shared_ptr.h"
24#include "fl/stl/string.h"
25#include "fl/stl/weak_ptr.h"
26#include "fl/stl/stdint.h"
27#include "fl/channels/config.h"
30
31namespace fl {
32
33// Forward declarations
34class IChannelDriver;
35class ChannelData;
36class PixelIterator;
37template <typename T> class vector_psram;
38struct ChannelOptions; // IWYU pragma: keep
39class Channel;
40template<const EmitterProfile& Profile> class StaticProfileChannel;
41class XMap;
43enum class ProfileId : u8 { WS2812B };
46
47#if FL_COLOR_PIPELINE_SHARED
49#endif
50
60class Channel: public CPixelLEDController<RGB>, public IChannel {
61public:
70 static ChannelPtr create(const ChannelConfig& config) FL_NO_EXCEPT;
71 template<const EmitterProfile& Profile>
72 static ChannelPtr create(const ChannelConfig& config) FL_NO_EXCEPT {
73#ifdef FL_IS_AVR
74 FL_STATIC_ASSERT(&Profile == nullptr, "Color profiles are unsupported on AVR");
75#endif
76 ChannelConfig rebound(config);
77#if FL_COLOR_PROFILE_RUNTIME
78 rebound.options.clearColorProfile();
80 rebound.options.mColorProfile.mStaticProfile = &Profile;
81 rebound.options.mColorProfile.mRequested = true;
82#else
83#endif
84 auto channel = fl::make_shared<StaticProfileChannel<Profile>>(rebound);
85 channel->mName = makeName(channel->mId, rebound.mName);
86 auto& events = ChannelEvents::instance();
87#if FL_COLOR_PROFILE_RUNTIME
88 if (channel->reconcileColorProfile(rebound.options)) {
89 events.onColorProfileFallback(
90 ColorProfileEvent{channel->id(), channel->colorProfileStatus(), {}});
91 }
92#endif
93 events.onChannelCreated(*channel);
94 return channel;
95 }
96 template<ProfileId Id>
97 static ChannelPtr create(const ChannelConfig& config) FL_NO_EXCEPT {
98 return create<profiles::WS2812B>(config);
99 }
100
102 virtual ~Channel() FL_NO_EXCEPT;
103
106 i32 id() const FL_NO_EXCEPT override { return mId; }
107
110 const fl::string& name() const FL_NO_EXCEPT override { return mName; }
111
114 int getPin() const FL_NO_EXCEPT;
115
118 int getClockPin() const FL_NO_EXCEPT;
119
124
127 fl::optional<float> getGamma() const FL_NO_EXCEPT;
128
133
137
141
143 bool isClockless() const FL_NO_EXCEPT { return mChipset.is<ClocklessChipset>(); }
144
146 bool isSpi() const FL_NO_EXCEPT { return mChipset.is<SpiChipsetConfig>(); }
147
151 void applyConfig(const ChannelConfig& config) FL_NO_EXCEPT;
152
153 // Re-expose protected base class methods for external access
156
159
162
163#if FL_COLOR_PROFILE_RUNTIME
176#if FL_COLOR_PIPELINE_SHARED
177 using ColorPipelineStorage = fl::shared_ptr<StreamingPipelineQ16>;
178#else
179 // Small tiers: sync-only readers, so single ownership is provably safe
180 // and saves the control block (FL_COLOR_PIPELINE_SHARED).
181 using ColorPipelineStorage = fl::unique_ptr<StreamingPipelineQ16>;
182#endif
183#endif
184
187
189 bool isInDrawList() const FL_NO_EXCEPT;
190
192 CLEDController* asController() FL_NO_EXCEPT { return static_cast<CLEDController*>(this); }
193 const CLEDController* asController() const FL_NO_EXCEPT { return static_cast<const CLEDController*>(this); }
194#ifndef FL_IS_AVR
195 const Channel* asChannel() const FL_NO_EXCEPT override { return this; }
196#endif
197
200
202 fl::span<const CRGB> leds() const FL_NO_EXCEPT;
203
206
209
212
214 Rgbw getRgbw() const FL_NO_EXCEPT;
215
216 bool hasColorProfile() const FL_NO_EXCEPT { return emitterProfile() != nullptr; }
227#if FL_COLOR_PROFILE_RUNTIME
228 return mPipeline != nullptr;
229#else
230 return false;
231#endif
232 }
234#ifdef FL_IS_AVR
235 return nullptr;
236#else
237 const EmitterProfile* profile = staticEmitterProfile();
238 return profile != nullptr && !mStaticProfileCleared
239 ? profile : mSettings.emitterProfile();
240#endif
241 }
243#if FL_COLOR_PROFILE_RUNTIME
244 return mSettings.mColorProfile.mSource;
245#else
247#endif
248 }
249 Chromaticity targetWhite() const FL_NO_EXCEPT { return mSettings.targetWhite(); }
250
251#if FL_COLOR_PIPELINE_SHARED
256#endif
257 bool isEnabled() const FL_NO_EXCEPT { return const_cast<Channel*>(this)->getEnabled(); }
262#if FL_COLOR_PROFILE_RUNTIME
263 return mColorProfileFallback;
264#else
265 return false;
266#endif
267 }
269#if FL_COLOR_PROFILE_RUNTIME
270 return mProfileBindingAccepted;
271#else
272 return true;
273#endif
274 }
276#if FL_COLOR_PROFILE_RUNTIME
277 if (mColorProfileFallback) return mProfileBindingAccepted ? ColorProfileStatus::Fallback : ColorProfileStatus::Rejected;
278#endif
280 }
281
284
289 Channel& setScreenMap(const fl::XYMap& map, float diameter = -1.f) FL_NO_EXCEPT;
290
295
301 Channel& setScreenMap(fl::u16 width, fl::u16 height, float diameter = -1.f) FL_NO_EXCEPT;
302
307
310 const fl::ScreenMap& getScreenMap() const FL_NO_EXCEPT;
311
314 bool hasScreenMap() const FL_NO_EXCEPT;
315
316private:
318 template<typename T, typename... Args>
319 friend fl::shared_ptr<T> fl::adl_barrier::make_shared(Args&&... args) FL_NO_EXCEPT; // see fl/stl/adl_barrier.h
320 template<const EmitterProfile& Profile>
322
323protected:
324 // CPixelLEDController interface implementation - protected so subclass delegates
325 // (e.g., UCS7604's DelegateController) can call through the base class chain.
326 void showPixels(PixelController<RGB, 1, 0xFFFFFFFF>& pixels) FL_NO_EXCEPT override;
327 void init() FL_NO_EXCEPT override;
328 using PixelEncoder = void (*)(Channel&, PixelIterator&, bool,
329 fl::vector_psram<u8>&);
330
331private:
341
346
349 FL_NO_INLINE void encodeFrame(PixelController<RGB, 1, 0xFFFFFFFF>& pixels) FL_NO_EXCEPT;
350
355
361 FL_NO_INLINE static void encodeWS2812(Channel&, PixelIterator&, bool,
365 FL_NO_INLINE static void encodeTM1908(Channel&, PixelIterator&, bool,
367 FL_NO_INLINE static void encodeUCS7604(Channel&, PixelIterator&, bool,
369 FL_NO_INLINE static void encodeAPA102(Channel&, PixelIterator&, bool,
371 FL_NO_INLINE static void encodeSK9822(Channel&, PixelIterator&, bool,
373 FL_NO_INLINE static void encodeWS2801(Channel&, PixelIterator&, bool,
375 FL_NO_INLINE static void encodeWS2803(Channel&, PixelIterator&, bool,
377 FL_NO_INLINE static void encodeP9813(Channel&, PixelIterator&, bool,
379 FL_NO_INLINE static void encodeLPD8806(Channel&, PixelIterator&, bool,
381 FL_NO_INLINE static void encodeLPD6803(Channel&, PixelIterator&, bool,
383 FL_NO_INLINE static void encodeSM16716(Channel&, PixelIterator&, bool,
385 FL_NO_INLINE static void encodeHD108(Channel&, PixelIterator&, bool,
387 FL_NO_INLINE static void encodeMY9221(Channel&, PixelIterator&, bool,
389
390private:
396 Channel(const ChipsetVariant& chipset, fl::span<CRGB> leds,
397 EOrder rgbOrder, const ChannelOptions& options) FL_NO_EXCEPT;
398
401 Channel(int pin, const ChipsetTimingConfig& timing, fl::span<CRGB> leds,
402 EOrder rgbOrder, const ChannelOptions& options) FL_NO_EXCEPT;
403
404 // Non-copyable, non-movable
405 Channel(const Channel&) FL_NO_EXCEPT = delete;
406 Channel& operator=(const Channel&) FL_NO_EXCEPT = delete;
408 Channel& operator=(Channel&&) FL_NO_EXCEPT = delete;
409
410 static i32 nextId() FL_NO_EXCEPT;
411 static fl::string makeName(i32 id, const fl::optional<fl::string>& configName = fl::optional<fl::string>()) FL_NO_EXCEPT;
412
413 ChipsetVariant mChipset; // Chipset configuration (clockless or SPI)
414 PixelEncoder mPixelEncoder = nullptr; // Bound once from mChipset at construction.
416#if FL_COLOR_PROFILE_RUNTIME
431 ColorPipelineStorage mPipeline;
432#endif
433 fl::weak_ptr<IChannelDriver> mDriver; // Cached dynamic driver (weak, prevents dangling pointers).
434 // Re-resolved by resolveDynamicDriver() on every showPixels()
435 // call so users can swap drivers at runtime.
436 Bus mBus = Bus::AUTO; // Typed driver selection (#2459). `Bus::AUTO` falls through
437 // to `ChannelManager` priority dispatch; any other value
438 // pins this channel to `busName(mBus)`.
439 fl::u8 mBusWhich = 0; // Instance selector for portable buses.
440 bool mBusWarned = false; // One-shot guard for the #2455 FL_ERROR. Flipped on the
441 // first showPixels() that observes a `mBus` miss (the
442 // named driver wasn't registered with ChannelManager).
443 // Subsequent shows on the same channel skip the warn even
444 // though the priority-dispatch fallback re-runs every frame.
449 bool mDisabledDriverWarned = false; // One-shot guard for the #2517 FL_ERROR. Flipped on the
450 // first showPixels() that would have enqueued data to a
451 // driver disabled by `setExclusiveDriver(...)` (or
452 // `setDriverEnabled(name, false)`). Cleared whenever the
453 // resolved driver returns to ENABLED so a subsequent
454 // disable re-emits the diagnostic.
455 const i32 mId;
456 fl::string mName; // User-specified or auto-generated name
457 ChannelDataPtr mChannelData;
458 fl::ScreenMap mScreenMap; // Screen map for JS canvas visualization
460#ifndef FL_IS_AVR
462#endif
464#ifndef FL_IS_AVR
465 void onSettingsChanged(SettingsChange change) FL_NO_EXCEPT override;
466 virtual const EmitterProfile* staticEmitterProfile() const FL_NO_EXCEPT { return nullptr; }
467#endif
468
469#if FL_COLOR_PROFILE_RUNTIME
470 // Recompute the color-profile verdict from the current mSettings and
471 // apply its consequences. Runs on both creation and reconfiguration, so
472 // applyConfig() cannot leave a channel reporting the verdict of the
473 // configuration it just replaced. Returns true when the binding fell back.
474 // Reads the requested configuration from `options`; mSettings may receive
475 // the current global source default while deriving the installed pipeline.
476 bool reconcileColorProfile(const ChannelOptions& options) FL_NO_EXCEPT;
477
481 void raiseColorProfileFallback(const char* reason) FL_NO_EXCEPT;
482
483 bool mColorProfileFallback = false;
484 bool mProfileBindingAccepted = true;
485 // C5 asks for the fallback warning to be one-time. Set on the first
486 // emission and never cleared: a channel reconfigured repeatedly while
487 // still unable to bind should say so once, not once per configure
488 // (#4333).
489 bool mWarnedColorProfileFallback = false;
490#endif
491};
492
495template<const EmitterProfile& Profile>
496class StaticProfileChannel final : public Channel {
497public:
499 : Channel(config.chipset, config.mLeds, config.rgb_order, config.options) {
500#ifdef FL_IS_AVR
501 FL_STATIC_ASSERT(&Profile == nullptr, "Color profiles are unsupported on AVR");
502#endif
503 }
504
505protected:
506#ifndef FL_IS_AVR
508#if FL_COLOR_PROFILE_RUNTIME
509 return nullptr;
510#else
511 return &Profile;
512#endif
513 }
514#endif
515};
516
520IChannelDriver* getStubChannelEngine() FL_NO_EXCEPT;
521
522} // namespace fl
CRGB leds[1]
fl::UISlider brightness("Brightness", BRIGHTNESS, 0, 255)
CLEDController * controller
Portable compile-time identifiers for LED channel buses.
CPixelLEDController(RegistrationMode mode) FL_NO_EXCEPT
bool getEnabled() FL_NO_EXCEPT
int getPin() const FL_NO_EXCEPT
Get the pin number for this channel (data pin)
static FL_NO_INLINE void encodeWS2801(Channel &, PixelIterator &, bool, fl::vector_psram< u8 > &) FL_NO_EXCEPT
EOrder mRgbOrder
Definition channel.h:415
int getClockPin() const FL_NO_EXCEPT
Get the clock pin for this channel (SPI only, -1 for clockless)
static FL_NO_INLINE void encodeSK9822(Channel &, PixelIterator &, bool, fl::vector_psram< u8 > &) FL_NO_EXCEPT
CRGB getTemperature() FL_NO_EXCEPT
Get the color temperature.
static i32 nextId() FL_NO_EXCEPT
void(*)(Channel &, PixelIterator &, bool, fl::vector_psram< u8 > &) PixelEncoder
Definition channel.h:328
u8 ditherPhase() const FL_NO_EXCEPT
Where this channel is in its dither cycle: the number of frames its driver has accepted,...
virtual ~Channel() FL_NO_EXCEPT
Destructor.
fl::u8 mBusWhich
Definition channel.h:439
ChipsetVariant mChipset
Definition channel.h:413
bool hasScreenMap() const FL_NO_EXCEPT
Check if screen map is configured.
void showPixels(PixelController< RGB, 1, 0xFFFFFFFF > &pixels) FL_NO_EXCEPT override
const Channel * asChannel() const FL_NO_EXCEPT override
Definition channel.h:195
bool isSpi() const FL_NO_EXCEPT
Check if this is an SPI chipset.
Definition channel.h:146
PixelEncoder mPixelEncoder
Definition channel.h:414
static FL_NO_INLINE void encodeWS2812(Channel &, PixelIterator &, bool, fl::vector_psram< u8 > &) FL_NO_EXCEPT
const CLEDController * asController() const FL_NO_EXCEPT
Definition channel.h:193
const SourceProfile & sourceProfile() const FL_NO_EXCEPT
Definition channel.h:242
bool isInDrawList() const FL_NO_EXCEPT
Check if this channel is in the controller draw list.
u8 mDitherPhase
This channel's temporal-dither phase.
Definition channel.h:448
const fl::string & name() const FL_NO_EXCEPT override
Get the channel name.
Definition channel.h:110
void showLeds(u8 brightness=255) FL_NO_EXCEPT OVERRIDE_IF_NOT_AVR
Show the LEDs with optional brightness scaling.
CRGB getCorrection() FL_NO_EXCEPT
Get the color correction.
fl::optional< float > getGamma() const FL_NO_EXCEPT
Get gamma correction value.
static fl::string makeName(i32 id, const fl::optional< fl::string > &configName=fl::optional< fl::string >()) FL_NO_EXCEPT
bool mBusWarned
Definition channel.h:440
u8 getDither() FL_NO_EXCEPT
Get the dither mode.
const fl::ScreenMap & getScreenMap() const FL_NO_EXCEPT
Get the current screen map.
void removeFromDrawList() FL_NO_EXCEPT
Remove this channel from the global controller draw list.
bool isEnabled() const FL_NO_EXCEPT
Definition channel.h:257
fl::span< CRGB > leds() FL_NO_EXCEPT
Get the LED array as a span (non-const)
void onSettingsChanged(SettingsChange change) FL_NO_EXCEPT override
FL_NO_INLINE fl::shared_ptr< IChannelDriver > resolveDynamicDriver() FL_NO_EXCEPT
Cold slow-path helper for showPixels().
fl::ScreenMap mScreenMap
Definition channel.h:458
ChannelDataPtr mChannelData
Definition channel.h:457
static FL_NO_INLINE void encodeTM1908(Channel &, PixelIterator &, bool, fl::vector_psram< u8 > &) FL_NO_EXCEPT
friend class StaticProfileChannel
Definition channel.h:321
static PixelEncoder selectPixelEncoder(const ChipsetVariant &) FL_NO_EXCEPT
The chipset is fixed when a Channel is constructed, so bind its pixel encoder once instead of switchi...
Channel & setScreenMap(const fl::XYMap &map, float diameter=-1.f) FL_NO_EXCEPT
Set screen map for JS canvas visualization from XYMap.
int size() const FL_NO_EXCEPT OVERRIDE_IF_NOT_AVR
Get the number of LEDs in this channel.
FL_NO_INLINE bool waitForInUseBuffer() FL_NO_EXCEPT
Cold helper for showPixels() when mChannelData is still in use by the driver: warns and waits for REA...
static FL_NO_INLINE void encodeLPD6803(Channel &, PixelIterator &, bool, fl::vector_psram< u8 > &) FL_NO_EXCEPT
bool isClockless() const FL_NO_EXCEPT
Check if this is a clockless chipset.
Definition channel.h:143
static FL_NO_INLINE void encodeP9813(Channel &, PixelIterator &, bool, fl::vector_psram< u8 > &) FL_NO_EXCEPT
fl::string getEngineName() const FL_NO_EXCEPT
Get the name of the currently bound driver (if any)
static FL_NO_INLINE void encodeWS2803(Channel &, PixelIterator &, bool, fl::vector_psram< u8 > &) FL_NO_EXCEPT
static FL_NO_INLINE void encodeUCS7604(Channel &, PixelIterator &, bool, fl::vector_psram< u8 > &) FL_NO_EXCEPT
Channel(const ChipsetVariant &chipset, fl::span< CRGB > leds, EOrder rgbOrder, const ChannelOptions &options) FL_NO_EXCEPT
Private constructor (use create() factory method)
ColorProfileStatus colorProfileStatus() const FL_NO_EXCEPT
Definition channel.h:275
bool hasColorProfile() const FL_NO_EXCEPT
Definition channel.h:216
const EmitterProfile * emitterProfile() const FL_NO_EXCEPT
Definition channel.h:233
static ChannelPtr create(const ChannelConfig &config) FL_NO_EXCEPT
Create a new channel with optional mBus driver pinning.
CLEDController * asController() FL_NO_EXCEPT
Get pointer to base CLEDController for linked list traversal.
Definition channel.h:192
void syncLegacySettings() FL_NO_EXCEPT
FL_NO_INLINE void encodeFrame(PixelController< RGB, 1, 0xFFFFFFFF > &pixels) FL_NO_EXCEPT
Encode pixels into mChannelData and fire onChannelDataEncoded (#4566).
static FL_NO_INLINE void encodeTM1812RGBWW(Channel &, PixelIterator &, bool, fl::vector_psram< u8 > &) FL_NO_EXCEPT
static FL_NO_INLINE void encodeLPD8806(Channel &, PixelIterator &, bool, fl::vector_psram< u8 > &) FL_NO_EXCEPT
virtual const EmitterProfile * staticEmitterProfile() const FL_NO_EXCEPT
Definition channel.h:466
Rgbw getRgbw() const FL_NO_EXCEPT
Get the RGBW conversion mode.
Chromaticity targetWhite() const FL_NO_EXCEPT
Definition channel.h:249
Channel & setGamma(float gamma) FL_NO_EXCEPT
Set gamma correction value.
bool mDisabledDriverWarned
Definition channel.h:449
bool isColorManaged() const FL_NO_EXCEPT
True when the streaming transform is actually installed in the output path, which is not the same que...
Definition channel.h:226
const ChipsetTimingConfig & getTiming() const FL_NO_EXCEPT
Get the timing configuration for this channel (clockless only)
void init() FL_NO_EXCEPT override
Initialize the LED controller.
fl::weak_ptr< IChannelDriver > mDriver
Definition channel.h:433
static FL_NO_INLINE void encodeAPA102(Channel &, PixelIterator &, bool, fl::vector_psram< u8 > &) FL_NO_EXCEPT
friend fl::shared_ptr< T > fl::adl_barrier::make_shared(Args &&... args) FL_NO_EXCEPT
Friend declaration for make_shared to access private constructor.
EOrder getRgbOrder() const FL_NO_EXCEPT
Get the RGB channel ordering.
Definition channel.h:140
bool mStaticProfileCleared
Definition channel.h:461
static FL_NO_INLINE void encodeMY9221(Channel &, PixelIterator &, bool, fl::vector_psram< u8 > &) FL_NO_EXCEPT
const i32 mId
Definition channel.h:455
void applyConfig(const ChannelConfig &config) FL_NO_EXCEPT
Apply reconfigurable settings from a ChannelConfig.
static ChannelPtr create(const ChannelConfig &config) FL_NO_EXCEPT
Definition channel.h:72
FL_NO_INLINE void submitFrame(const fl::shared_ptr< IChannelDriver > &driver) FL_NO_EXCEPT
Submit the encoded frame to driver: disabled-driver drop + one-shot diagnostic, enqueue,...
bool hasColorProfileFallback() const FL_NO_EXCEPT
Definition channel.h:261
void addToDrawList() FL_NO_EXCEPT
Add this channel to the global controller draw list.
fl::string mName
Definition channel.h:456
const ChipsetVariant & getChipset() const FL_NO_EXCEPT
Get the chipset configuration variant.
Definition channel.h:136
static FL_NO_INLINE void encodeSM16716(Channel &, PixelIterator &, bool, fl::vector_psram< u8 > &) FL_NO_EXCEPT
bool profileBindingAccepted() const FL_NO_EXCEPT
Definition channel.h:268
ChannelOptions mSettings
Definition channel.h:459
static FL_NO_INLINE void encodeHD108(Channel &, PixelIterator &, bool, fl::vector_psram< u8 > &) FL_NO_EXCEPT
Transmission data for a single LED channel.
Definition data.h:55
LED channel for parallel output, pretty much a CPixelLEDController but with timing and pin informatio...
Definition channel.h:60
IChannel() FL_NO_EXCEPT=default
Minimal interface for LED channel transmission drivers.
Definition driver.h:52
StaticProfileChannel(const ChannelConfig &config) FL_NO_EXCEPT
Definition channel.h:498
const EmitterProfile * staticEmitterProfile() const FL_NO_EXCEPT override
Definition channel.h:507
A compile-time profile channel.
Definition channel.h:496
#define FL_NO_INLINE
#define OVERRIDE_IF_NOT_AVR
defines the templated version of the CLEDController class
Type-erased base for the templated Channel<Bus, Chipset> family.
byte Channel
Definition midi_Defs.h:58
shared_ptr< T > make_shared(Args &&... args) FL_NO_EXCEPT
Definition shared_ptr.h:423
SourceProfile & defaultSourceProfile() FL_NO_EXCEPT
unsigned char u8
Definition stdint.h:131
u8 u8 fract8 blur_amount FL_NO_EXCEPT
Definition blur.h:186
void installColorPipelineHooks() FL_NO_EXCEPT
Point the hooks at the real implementations.
IChannelDriver * getStubChannelEngine() FL_NO_EXCEPT
Get stub channel driver for testing or unsupported platforms.
MapRedBlackTree< Key, T, Compare, fl::allocator_slab< char > > map
Definition map.h:283
constexpr u32 gamma(float g) FL_NO_EXCEPT
Definition gamma_lut.h:36
u8 u8 height
Definition blur.h:186
Optional< T > optional
Definition optional.h:16
fl::variant< ClocklessChipset, SpiChipsetConfig > ChipsetVariant
Definition config.h:157
Bus
Portable public bus selector.
Definition bus.h:27
@ AUTO
Definition bus.h:28
u8 width
Definition blur.h:186
EOrder
RGB color channel orderings, used when instantiating controllers to determine what order the controll...
Definition eorder.h:15
ColorProfileStatus
Definition channel.h:42
ProfileId
Definition channel.h:43
Base definition for an LED controller.
Definition crgb.hpp:179
Payload shared by every color-profile notification.
corkscrew_args args
Definition old.h:149
#define FL_NO_EXCEPT
#define FASTLED_SHARED_PTR(type)
Definition shared_ptr.h:577
#define FL_STATIC_ASSERT(...)
Pixel controller class.
Representation of an 8-bit RGB pixel (Red, Green, Blue)
Definition crgb.h:38
fl::optional< fl::string > mName
Optional user-specified name (if not set, Channel generates one automatically)
Definition config.h:283
ChannelOptions options
Optional channel settings (correction, temperature, dither, rgbw, affinity)
Definition config.h:277
fl::span< CRGB > mLeds
LED data array.
Definition config.h:271
ChipsetVariant chipset
Chipset configuration (clockless or SPI)
Definition config.h:268
EOrder rgb_order
RGB channel ordering.
Definition config.h:274
Configuration for a single LED channel.
Definition config.h:167
static ChannelEvents & instance() FL_NO_EXCEPT
void clearColorProfile() FL_NO_EXCEPT
Definition options.h:229
Optional channel configuration parameters All fields have sensible defaults and can be overridden as ...
Definition options.h:92
Runtime bit-period timing for a clockless chipset.
CIE 1931 xy chromaticity, independent of encoded storage and chipset.
Clockless chipset configuration (single data pin)
Definition config.h:33
A source declaration, not a container or an output-device selection.
SPI chipset configuration (data + clock pins)
Definition config.h:103