4#include "platforms/is_platform.h"
44#if FL_COLOR_PROFILE_RUNTIME
69 const XYMap* addressing,
88 u16 numLeds = pixels.size();
89 u16
width = addressing->getWidth();
90 u16
height = addressing->getHeight();
94 if (expectedLeds != numLeds) {
95 FL_ERROR(
"Channel '" << channelName <<
"': XYMap dimensions (" <<
width <<
"x" <<
height <<
"=" << expectedLeds <<
") don't match LED count (" << numLeds <<
"). Addressing transformation may produce unexpected results.");
99 const CRGB* pixelArray = (
const CRGB*)pixels.mData;
107 for (u16 physicalIdx = 0; physicalIdx < numLeds; physicalIdx++) {
108 u16
x = physicalIdx %
width;
109 u16
y = physicalIdx /
width;
110 u16 sourceIdx = addressing->mapToIndex(
x,
y);
111 buffer[physicalIdx] = (sourceIdx < numLeds) ? pixelArray[sourceIdx] :
CRGB::Black;
121#if FL_COLOR_PROFILE_RUNTIME
123 if (pipeline !=
nullptr && hooks.
makeIterator !=
nullptr) {
131 mManagedSourceStorage, mManagedIteratorStorage, base, rgbOrder,
138#if FL_COLOR_PROFILE_RUNTIME
141 if (mManagedIterator !=
nullptr) {
145 mManagedIteratorStorage);
147 mManagedIterator =
nullptr;
158#if FL_COLOR_PROFILE_RUNTIME
159 if (mManagedIterator !=
nullptr) {
160 return *mManagedIterator;
178#if FL_COLOR_PROFILE_RUNTIME
179 return mManagedIterator !=
nullptr;
199#if FASTLED_LOG_RUNTIME_ENABLED
201static void emitDisabledDriverError(
const fl::string& channelName,
206 if (!exclusive.empty()) {
207 FL_ERROR(
"Channel '" << channelName <<
"': bound driver '" << driverName <<
"' is currently DISABLED by exclusive-driver selection '" << exclusive <<
"'. Frame will be silently dropped. Resolve with: FastLED.enableDrivers<fl::Bus::" << driverName <<
">() or FastLED.enableAllDrivers().");
209 FL_ERROR(
"Channel '" << channelName <<
"': bound driver '" << driverName <<
"' is currently DISABLED. Frame will be silently dropped. Resolve with: FastLED.enableDrivers<fl::Bus::" << driverName <<
">() or FastLED.enableAllDrivers().");
219 switch (clockless->encoder) {
221 return &Channel::encodeWS2812;
223 return &Channel::encodeTM1812RGBWW;
225 return &Channel::encodeTM1908;
226#if !defined(FASTLED_DISABLE_UCS7604) || !FASTLED_DISABLE_UCS7604
230 return &Channel::encodeUCS7604;
234#if !defined(FASTLED_DISABLE_SPI_CHIPSETS) || !FASTLED_DISABLE_SPI_CHIPSETS
235 switch (
spi->timing.chipset) {
242 return &Channel::encodeAPA102;
245 return &Channel::encodeSK9822;
247 return &Channel::encodeWS2801;
249 return &Channel::encodeWS2803;
251 return &Channel::encodeP9813;
253 return &Channel::encodeLPD8806;
255 return &Channel::encodeLPD6803;
257 return &Channel::encodeSM16716;
259 return &Channel::encodeMY9221;
261 return &Channel::encodeHD108;
274 if (configName.has_value()) {
275 return configName.value();
283#if FASTLED_LOG_RUNTIME_ENABLED
298 config.rgb_order, config.options);
300#if FL_COLOR_PROFILE_RUNTIME
301 if (channel->reconcileColorProfile(config.options)) {
302 events.onColorProfileFallback(
306 channel->mName =
makeName(channel->mId, config.mName);
307 events.onChannelCreated(*channel);
390 events.onChannelBeginDestroy(*
this);
402 if (
rgbw->active()) {
406 if (rgbww->active()) {
431#if FL_COLOR_PROFILE_RUNTIME
437#if FL_COLOR_PROFILE_RUNTIME
438void Channel::raiseColorProfileFallback(
const char* reason)
FL_NO_EXCEPT {
439 mColorProfileFallback =
true;
445 if (mWarnedColorProfileFallback) {
448 if (mProfileBindingAccepted) {
449 FL_WARN(
"Channel " <<
id() <<
": color management requested but " << reason <<
"; falling back to the legacy path");
451 FL_WARN(
"Channel " <<
id() <<
": color management requested but " << reason <<
"; strict mode disables this channel");
453 mWarnedColorProfileFallback =
true;
461 const bool wasRejectedByUs = mColorProfileFallback && !mProfileBindingAccepted;
466 mColorProfileFallback =
false;
467 mProfileBindingAccepted =
true;
473 if (options.mColorProfile.mRequested && !options.hasColorProfile()) {
474 raiseColorProfileFallback(
"no profile bound");
476 if (options.mColorProfile.mUseGlobalSourceDefault) {
485 const bool rejectedBeforeBuild = mColorProfileFallback && !mProfileBindingAccepted;
494 if (!rejectedBeforeBuild && hooks.build !=
nullptr) {
502 if (hooks.build(mSettings.mColorProfile, mSettings, mChipset,
504#if FL_COLOR_PIPELINE_SHARED
509 }
else if (options.hasColorProfile()) {
520 raiseColorProfileFallback(
"bound profile builds no usable pipeline");
526 const bool rejectedNow = mColorProfileFallback && !mProfileBindingAccepted;
529 }
else if (wasRejectedByUs) {
532 return mColorProfileFallback;
541 const bool compatible = currentClockless && incomingClockless
542 ? currentClockless->
timing == incomingClockless->
timing &&
543 currentClockless->encoder == incomingClockless->
encoder
544 : currentSpi && incomingSpi && currentSpi->
timing == incomingSpi->
timing &&
545 currentSpi->spiBus == incomingSpi->
spiBus;
547 FL_WARN(
"Channel " <<
id() <<
": applyConfig rejected, chipset conflicts with the existing binding");
551 (config.options.mBus !=
mBus || config.options.mBusWhich !=
mBusWhich)) {
552 FL_WARN(
"Channel " <<
id() <<
": applyConfig rejected, bus conflicts with the existing binding");
556 if (config.mName.has_value()) {
557 mName = config.mName.value();
562#if !FL_COLOR_PROFILE_RUNTIME && !defined(FL_IS_AVR)
571#if FL_COLOR_PROFILE_RUNTIME
572 if (reconcileColorProfile(config.options)) {
576 events.onChannelConfigured(*
this, config);
581 return spi->clockPin;
620 u8 rgb_currents[3] = {current.
r, current.
g, current.
b};
621 u8 pos0 = (
static_cast<int>(rgbOrder) >> 6) & 0x3;
622 u8 pos1 = (
static_cast<int>(rgbOrder) >> 3) & 0x3;
623 u8 pos2 = (
static_cast<int>(rgbOrder) >> 0) & 0x3;
625 rgb_currents[pos0], rgb_currents[pos1], rgb_currents[pos2], current.
w);
640 const bool wide_source = managed;
641 float gamma = settings.mGamma.value_or(2.8f);
644 bool is_rgbw = pixelIterator.get_rgbw().active();
645 size_t num_leds = pixelIterator.size();
653 if (pixelIterator.get_rgbww().active() && !is_rgbw) {
654 FL_WARN_ONCE(
"UCS7604 cannot carry 5-channel RGBWW — this chipset "
655 "always emits 4-channel RGBW. The warm/cool white "
656 "channels in your Rgbww config will be dropped. "
657 "Set ChannelOptions.mWhiteCfg = Rgbw{...} instead to "
658 "silence this warning.");
663 mode, wire_current, is_rgbw, gamma8.
get(), wide_source);
677#if FL_COLOR_PROFILE_RUNTIME
697 return spi->timing.chipset;
705 pixels.writeWS2812(&output);
711 pixels.writeTM1812RGBWW(&output);
717 pixels.writeTM1908(&output);
726 writeUCS7604(&output, pixels, clockless->
encoder, channel.mSettings,
727 channel.mRgbOrder, managed);
734 const SpiChipset chipset = spiChipsetFor(channel);
735 if (tryEncodeManagedSpi(channel, pixels, managed, output, chipset)) {
741 pixels.writeAPA102(&output, hdGamma);
748 const SpiChipset chipset = spiChipsetFor(channel);
749 if (tryEncodeManagedSpi(channel, pixels, managed, output, chipset)) {
759 if (tryEncodeManagedSpi(channel, pixels, managed, output,
760 spiChipsetFor(channel))) {
763 pixels.writeWS2801(&output);
770 if (tryEncodeManagedSpi(channel, pixels, managed, output,
771 spiChipsetFor(channel))) {
774 pixels.writeWS2803(&output);
781 if (tryEncodeManagedSpi(channel, pixels, managed, output,
782 spiChipsetFor(channel))) {
785 pixels.writeP9813(&output);
792 if (tryEncodeManagedSpi(channel, pixels, managed, output,
793 spiChipsetFor(channel))) {
796 pixels.writeLPD8806(&output);
803 if (tryEncodeManagedSpi(channel, pixels, managed, output,
804 spiChipsetFor(channel))) {
807 pixels.writeLPD6803(&output);
814 if (tryEncodeManagedSpi(channel, pixels, managed, output,
815 spiChipsetFor(channel))) {
818 pixels.writeSM16716(&output);
825 if (tryEncodeManagedSpi(channel, pixels, managed, output,
826 spiChipsetFor(channel))) {
829 pixels.writeHD108(&output, managed);
836 (void)tryEncodeManagedSpi(channel, pixels, managed, output,
837 spiChipsetFor(channel));
850#if defined(FASTLED_DISABLE_DYNAMIC_DRIVER) && FASTLED_DISABLE_DYNAMIC_DRIVER
868 if (!driver || (
mBus !=
Bus::AUTO && driver->getName() != busKey) ||
869 !driver->configureWorker(
mSettings.mWorker)) {
870 FL_ERROR(
"Channel: worker configuration rejected - dropping frame");
880#if FASTLED_LOG_RUNTIME_ENABLED
881 if (
mBus !=
Bus::AUTO && (!driver || driver->getName() != busKey)) {
884 const fl::string using_name = driver ? driver->getName()
889 <<
"' is not enabled - falling back to " << using_name
890 <<
". Fix: FastLED.enable<fl::Bus::" << busKey
891 <<
">() (links only this driver) or FastLED.enableAllDrivers().");
894 <<
"' is disabled - falling back to " << using_name
895 <<
". Fix: FastLED.setDriverEnabled(\"" << busKey
896 <<
"\", true), or drop the setExclusiveDriver() that disabled it.");
899 <<
"' cannot handle this chipset (bus/chipset mismatch) - falling back to "
900 << using_name <<
". Fix: pick a bus that supports this chipset.");
904 FL_ERROR(
"Channel '" <<
mName <<
"': No compatible driver found - cannot transmit");
918 FL_WARN(
"Channel '" <<
mName <<
"': showPixels() called while mChannelData is in use by driver, attempting to wait");
921 FL_ERROR(
"Channel '" <<
mName <<
"': No driver bound yet the mChannelData is in use - cannot transmit");
925 bool ok = driver->waitForReady();
927 FL_ERROR(
"Channel '" <<
mName <<
"': Timeout occurred while waiting for driver to become READY");
930 FL_WARN(
"Channel '" <<
mName <<
"': Engine became READY after waiting");
951#if !defined(FASTLED_DISABLE_DYNAMIC_DRIVER) || !FASTLED_DISABLE_DYNAMIC_DRIVER
976#if FL_COLOR_PROFILE_RUNTIME
990#if FL_COLOR_PIPELINE_SHARED
991 const ColorPipelineStorage pipeline_ref = mPipeline;
1004 if (pixels.ditherActive()) {
1014 whiteSettings.rgbw(), whiteSettings.rgbww(),
1016 pixels.mColorAdjustment.premixed.r);
1022 const auto* rgbww = whiteSettings.mWhiteCfg.ptr<
Rgbww>();
1023 const auto*
rgbw = whiteSettings.mWhiteCfg.ptr<
Rgbw>();
1024 if (rgbww !=
nullptr && rgbww->active()) {
1026 }
else if (
rgbw !=
nullptr &&
rgbw->active()) {
1058#if FASTLED_LOG_RUNTIME_ENABLED
1060 emitDisabledDriverError(
1075#if FASTLED_LOG_RUNTIME_ENABLED
1090 events.onChannelEnqueued(*
this, driverName);
1110 static bool warned =
false;
1112 FL_DBG(
"StubChannelEngine: No-op enqueue (use for testing or unsupported platforms)");
1137 static StubChannelEngine instance;
1144 FL_WARN(
"Channel '" <<
mName <<
"': Skipping addToDrawList() - already in draw list");
1150 events.onChannelAdded(*
this);
1155 FL_WARN(
"Channel '" <<
mName <<
"': Skipping removeFromDrawList() - not in draw list");
1161 events.onChannelRemoved(*
this);
1203#if FL_COLOR_PIPELINE_SHARED
1226 return driver->getName();
1233 if (diameter <= 0.0f) {
fl::UISlider brightness("Brightness", BRIGHTNESS, 0, 255)
ESP32-P4 Parallel IO (PARLIO) LED channel.
CPixelLEDController(RegistrationMode mode) FL_NO_EXCEPT
T fetch_add(T value) FL_NO_EXCEPT
bool isInList() const FL_NO_EXCEPT
Check if this controller is in the linked list.
@ DeferRegister
Defer registration until addToList() is called.
LegacySettings mLegacySettings
VIRTUAL_IF_NOT_AVR int size() const FL_NO_EXCEPT
How many LEDs does this controller manage?
CLEDController & setLeds(CRGB *data, int nLeds) FL_NO_EXCEPT
Set the default array of LEDs to be used by this controller.
CRGB getCorrection() FL_NO_EXCEPT
Get the correction value used by this controller.
fl::u8 getDither() const FL_NO_EXCEPT
Get the dithering option currently set for this controller.
CRGB getTemperature() FL_NO_EXCEPT
Get the color temperature, aka white point, for this controller.
void removeFromDrawList() FL_NO_EXCEPT
Remove this controller from the draw list.
CRGB * leds() FL_NO_EXCEPT
Pointer to the CRGB array for this controller.
Rgbw getRgbw() const FL_NO_EXCEPT
VIRTUAL_IF_NOT_AVR void showLeds(fl::u8 brightness) FL_NO_EXCEPT
void addToList() FL_NO_EXCEPT
Add this controller to the linked list.
static i32 nextId() FL_NO_EXCEPT
i32 id() const FL_NO_EXCEPT override
Get the channel ID.
bool isSpi() const FL_NO_EXCEPT
Check if this is an SPI chipset.
PixelEncoder mPixelEncoder
u8 mDitherPhase
This channel's temporal-dither phase.
static fl::string makeName(i32 id, const fl::optional< fl::string > &configName=fl::optional< fl::string >()) FL_NO_EXCEPT
fl::span< CRGB > leds() FL_NO_EXCEPT
Get the LED array as a span (non-const)
FL_NO_INLINE fl::shared_ptr< IChannelDriver > resolveDynamicDriver() FL_NO_EXCEPT
Cold slow-path helper for showPixels().
ChannelDataPtr mChannelData
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.
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...
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
CLEDController * asController() FL_NO_EXCEPT
Get pointer to base CLEDController for linked list traversal.
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).
bool mDisabledDriverWarned
fl::weak_ptr< IChannelDriver > mDriver
bool mStaticProfileCleared
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,...
static ChannelDataPtr create(const ChipsetVariant &chipset, fl::vector_psram< u8 > &&encodedData=fl::vector_psram< u8 >(), ChannelPixelFormat pixelFormat=ChannelPixelFormat::RGB) FL_NO_EXCEPT
Create channel transmission data (modern variant-based API)
LED channel for parallel output, pretty much a CPixelLEDController but with timing and pin informatio...
fl::shared_ptr< IChannelDriver > findDriverByName(const fl::string &name) const FL_NO_EXCEPT
Silent counterpart to getDriverByName().
static ChannelManager & instance() FL_NO_EXCEPT
Get the global singleton instance.
DriverStatus driverStatus(const fl::string &name) const FL_NO_EXCEPT
Look up a driver's registration status without logging on miss.
@ STATUS_ENABLED
Driver is registered and enabled.
@ STATUS_DISABLED
Driver is registered but disabled.
fl::shared_ptr< IChannelDriver > selectDriverForChannel(const ChannelDataPtr &data, const fl::string &affinity) FL_NO_EXCEPT
Select best driver for channel data (used by Channel::showPixels)
static void onCanvasUiSet(CLEDController *strip, const ScreenMap &xymap) FL_NO_EXCEPT
static fl::shared_ptr< const Gamma8 > getOrCreate(float gamma) FL_NO_EXCEPT
IChannelDriver() FL_NO_EXCEPT=default
Minimal interface for LED channel transmission drivers.
Adapter class that creates a PixelIterator from any color order.
static XYMap constructRectangularGrid(u16 width, u16 height, u16 offset=0) FL_NO_EXCEPT
static XYMap fromXMap(const XMap &xmap) FL_NO_EXCEPT
Create an XYMap from an XMap (treats 1D as 2D with height=1)
PixelIteratorAny mPixelIterator
const PixelIterator & get() const FL_NO_EXCEPT
bool isManaged() const FL_NO_EXCEPT
True when get() hands back the colour-managed iterator.
ReorderingPixelIteratorAny(PixelController< RGB, 1, 0xFFFFFFFF > &pixels, const XYMap *addressing, EOrder rgbOrder, Rgbw rgbw, Rgbww rgbww, const fl::string &channelName, StreamingPipelineQ16 *pipeline, u8 ditherPhase, u8 brightness) FL_NO_EXCEPT
Construct pixel iterator with optional addressing transformation.
PixelIterator & get() FL_NO_EXCEPT
Get the constructed pixel iterator.
static fl::vector< CRGB > & getReorderBufferTLS() FL_NO_EXCEPT
Get thread-local buffer for addressing transformation.
~ReorderingPixelIteratorAny() FL_NO_EXCEPT
fl::optional< PixelController< RGB, 1, 0xFFFFFFFF > > mAddressedController
virtual void enqueue(ChannelDataPtr) FL_NO_EXCEPT override
Enqueue channel data for transmission.
virtual void show() FL_NO_EXCEPT override
Trigger transmission of enqueued data.
virtual fl::string getName() const FL_NO_EXCEPT override
Get the driver name for affinity binding.
virtual bool canHandle(const ChannelDataPtr &data) const FL_NO_EXCEPT override
Check if this driver can handle the given channel data.
virtual DriverState poll() FL_NO_EXCEPT override
Query driver state and perform maintenance.
virtual Capabilities getCapabilities() const FL_NO_EXCEPT override
Get driver capabilities (clockless, SPI, or both)
virtual ~StubChannelEngine() FL_NO_EXCEPT=default
T * get() const FL_NO_EXCEPT
static string from_literal(const char *literal) FL_NO_EXCEPT
fl::size size() const FL_NO_EXCEPT
void resize(fl::size n) FL_NO_EXCEPT
void clear() FL_NO_EXCEPT
Channel transmission data - lightweight DTO for driver transmission.
#define DISABLE_DITHER
Disable dithering.
UCS7604 LED chipset encoder implementation.
#define FL_WARN_ONCE(...)
#define FL_WARN_EVERY(MILLIS,...)
Centralized logging categories for FastLED hardware interfaces and subsystems.
Unified manager for channel drivers with priority-based fallback.
fl::enable_if<!fl::is_array< T >::value, unique_ptr< T > >::type make_unique(Args &&... args) FL_NO_EXCEPT
shared_ptr< T > make_shared(Args &&... args) FL_NO_EXCEPT
FL_NO_INLINE bool tryEncodeManagedSpi(Channel &channel, PixelIterator &pixels, bool managed, fl::vector_psram< u8 > &output, SpiChipset chipset) FL_NO_EXCEPT
Shared color-managed SPI override check.
void writeUCS7604(fl::vector_psram< u8 > *data, PixelIterator &pixelIterator, ClocklessEncoder encoder, const ChannelOptions &settings, EOrder rgbOrder, bool managed) FL_NO_EXCEPT
Encode UCS7604 pixel data into the channel data buffer.
SpiChipset spiChipsetFor(const Channel &channel) FL_NO_EXCEPT
void enable_rgbww_conversion() FL_NO_EXCEPT
Installs the RGBWW pixel conversion (see enable_rgbw_conversion, #4795).
bool & colorProfileStrictMode() FL_NO_EXCEPT
void enable_rgbw_conversion() FL_NO_EXCEPT
Installs the RGBW pixel conversion used by PixelIterator.
void enable_rgbw_power_estimate() FL_NO_EXCEPT
Lets the power limiter charge a controller's RGBW conversion.
SourceProfile & defaultSourceProfile() FL_NO_EXCEPT
CurrentControl brightness() FL_NO_EXCEPT
Get current global UCS7604 brightness value.
back_insert_iterator< Container > back_inserter(Container &c) FL_NO_EXCEPT
Helper function to create a back_insert_iterator.
u8 u8 fract8 blur_amount FL_NO_EXCEPT
ClocklessEncoder
Identifies which encoder to use for clockless chipsets in the Channel API.
@ CLOCKLESS_ENCODER_UCS7604_8BIT
UCS7604 8-bit 800KHz.
@ CLOCKLESS_ENCODER_TM1812_RGBWW
TM1812: two 5-byte RGBWW pixels in each 12-byte IC frame.
@ CLOCKLESS_ENCODER_UCS7604_16BIT
UCS7604 16-bit 800KHz.
@ CLOCKLESS_ENCODER_UCS7604_16BIT_1600
UCS7604 16-bit 1600KHz.
@ CLOCKLESS_ENCODER_WS2812
Default, no preamble (WS2812 and compatible)
@ CLOCKLESS_ENCODER_TM1908
TM1908: command prefix followed by RGB pixels.
IChannelDriver * getStubChannelEngine() FL_NO_EXCEPT
Get stub channel driver for testing or unsupported platforms.
MapRedBlackTree< Key, T, Compare, fl::allocator_slab< char > > map
constexpr u32 gamma(float g) FL_NO_EXCEPT
void prepare_rgbw_colorimetric(const Rgbw &) FL_NO_EXCEPT
const char * busDriverName(Bus b, fl::u8 which=0, bool spi=false) FL_NO_EXCEPT
Concrete ChannelManager driver name for a portable bus.
constexpr fl::size kColorPipelineSourceStorage
The two things Channel needs from the colour pipeline, reached through pointers rather than by name.
fl::variant< ClocklessChipset, SpiChipsetConfig > ChipsetVariant
ColorPipelineHooks & colorPipelineHooks() FL_NO_EXCEPT
The installed hooks.
struct FL_ALIGNAS(4) Wave3BitExpansionLut
Lookup table for nibble-to-waveform expansion in wave3 format (32 bytes)
constexpr fl::size kColorPipelineIteratorStorage
UCS7604Mode
UCS7604 protocol configuration modes.
@ UCS7604_MODE_8BIT_800KHZ
@ UCS7604_MODE_16BIT_1600KHZ
@ UCS7604_MODE_16BIT_800KHZ
string to_string(T value) FL_NO_EXCEPT
EOrder
RGB color channel orderings, used when instantiating controllers to determine what order the controll...
void encodeUCS7604(PixelIterator &pixel_iter, size_t num_leds, OutputIterator out, UCS7604Mode mode, const UCS7604CurrentControl ¤t, bool is_rgbw, const Gamma8 *gamma=nullptr, bool wide_source=false) FL_NO_EXCEPT
Encode complete UCS7604 frame (preamble + padding + pixel data)
SpiChipset
LED chipsets with SPI interface (clocked protocols) Modern type-safe enum class - prefer this for new...
@ SM16716
SM16716 LED chipset.
@ LPD6803
LPD6803 LED chipset.
@ APA102HD
APA102 LED chipset with 5-bit gamma correction.
@ HD107
Same as APA102, but in turbo 40-mhz mode.
@ DOTSTARHD
APA102HD LED chipset alias.
@ SK9822HD
SK9822 LED chipset with 5-bit gamma correction.
@ SK9822
SK9822 LED chipset.
@ DOTSTAR
APA102 LED chipset alias.
@ P9813
P9813 LED chipset.
@ APA102
APA102 LED chipset.
@ HD108
16-bit variant of HD107, always gamma corrected. No SD (standard definition) option available - all H...
@ LPD8806
LPD8806 LED chipset.
@ WS2803
WS2803 LED chipset.
@ MY9221
MY9221 12-channel LED driver (dual-edge clocked; 4 RGB LEDs per chip)
@ WS2801
WS2801 LED chipset.
@ HD107HD
Same as APA102HD, but in turbo 40-mhz mode.
Base definition for an LED controller.
void(* destroyIterator)(void *source_storage, void *iterator_storage)
Destroys what makeIterator built. Null until installed.
bool(* encodeManagedSpi)(PixelIterator &pixels, vector_psram< u8 > *out, SpiChipset chip, const Channel &controller)
Unscaled (full-brightness) power demand of leds as the pipeline will drive them, in mW,...
PixelIterator *(* makeIterator)(void *source_storage, void *iterator_storage, PixelController< RGB, 1, 0xFFFFFFFF > &controller, EOrder order, ColorPipelineFrameRef pipeline, const Rgbw &rgbw, Rgbww rgbww, u8 dither_phase, u8 brightness)
Constructs a colour-managed PixelIterator in caller-provided storage.
Payload shared by every color-profile notification.
Everything the per-pixel path needs, derived once when a profile binds.
#define FL_COLOR_PIPELINE_SHARED
Shared ownership of a channel's colour pipeline, the controller accessor that hands it out,...
Low level pixel data writing class.
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>
Representation of an 8-bit RGB pixel (Red, Green, Blue)
Configuration for a single LED channel.
static ChannelEvents & instance() FL_NO_EXCEPT
Optional channel configuration parameters All fields have sensible defaults and can be overridden as ...
Runtime bit-period timing for a clockless chipset.
ChipsetTimingConfig timing
T1/T2/T3 timing parameters.
ClocklessEncoder encoder
Byte-level encoding pipeline (default: WS2812)
Clockless chipset configuration (single data pin)
Driver state with optional error message.
SpiEncoder timing
SPI encoder configuration.
Esp32SpiBus spiBus
ESP-IDF host override, or AUTO.
SPI chipset configuration (data + clock pins)
u8 g
Green channel current (0x0-0xF)
u8 b
Blue channel current (0x0-0xF)
u8 w
White channel current (0x0-0xF)
u8 r
Red channel current (0x0-0xF)
UCS7604 current control structure with 4-bit fields for each channel.
UCS7604 LED chipset controller implementation for FastLED.