|
FastLED 3.9.15
|
Transmission data for a single LED channel.
This lightweight data transfer object holds everything the driver needs to transmit LED data: pin number, timing configuration, and encoded bytes. Separated from Channel to allow concurrent transmission while channels prepare next frame.
#include <data.h>
Collaboration diagram for fl::ChannelData:Public Member Functions | |
| ~ChannelData () | |
| Destructor with debug logging. | |
| const ChipsetVariant & | getChipset () const FL_NOEXCEPT |
| Get the chipset configuration variant. | |
| const fl::vector_psram< u8 > & | getData () const FL_NOEXCEPT |
| Get the encoded transmission data. | |
| fl::vector_psram< u8 > & | getData () FL_NOEXCEPT |
| Get the encoded transmission data (mutable) | |
| size_t | getMinimumSize () const FL_NOEXCEPT |
| Calculate the size needed for writeWithPadding() without allocating. | |
| int | getPin () const FL_NOEXCEPT |
| Get the GPIO pin number. | |
| size_t | getSize () const FL_NOEXCEPT |
| Get the data size in bytes. | |
| const ChipsetTimingConfig & | getTiming () const FL_NOEXCEPT |
| Get the timing configuration (clockless chipsets only) | |
| bool | isClockless () const FL_NOEXCEPT |
| Check if this is a clockless chipset. | |
| bool | isInUse () const FL_NOEXCEPT |
| Check if channel data is currently in use by the driver. | |
| bool | isSpi () const FL_NOEXCEPT |
| Check if this is an SPI chipset. | |
| void | setInUse (bool inUse) FL_NOEXCEPT |
| Mark channel data as in use by the driver. | |
| void | setPaddingGenerator (PaddingGenerator generator) FL_NOEXCEPT |
| Set the padding generator for this channel. | |
| void | writeWithPadding (fl::span< u8 > dst) FL_NOEXCEPT |
| Write encoded data with padding to destination buffer. | |
Static Public Member Functions | |
| static ChannelDataPtr | create (const ChipsetVariant &chipset, fl::vector_psram< u8 > &&encodedData=fl::vector_psram< u8 >()) FL_NOEXCEPT |
| Create channel transmission data (modern variant-based API) | |
| static ChannelDataPtr | create (int pin, const ChipsetTimingConfig &timing, fl::vector_psram< u8 > &&encodedData=fl::vector_psram< u8 >()) FL_NOEXCEPT |
| Create channel transmission data (backwards compatibility) | |
Private Member Functions | |
| ChannelData (const ChannelData &) FL_NOEXCEPT=delete | |
| ChannelData (const ChipsetVariant &chipset, fl::vector_psram< u8 > &&encodedData) FL_NOEXCEPT | |
| Private constructor - variant-based (modern API) | |
| ChannelData (int pin, const ChipsetTimingConfig &timing, fl::vector_psram< u8 > &&encodedData) FL_NOEXCEPT | |
| Private constructor - legacy API (backwards compatibility) | |
| ChannelData & | operator= (const ChannelData &) FL_NOEXCEPT=delete |
Private Attributes | |
| ChipsetVariant | mChipset |
| Chipset configuration (clockless or SPI) | |
| fl::vector_psram< u8 > | mEncodedData |
| Encoded transmission bytes (PSRAM) | |
| volatile bool | mInUse = false |
| Engine is transmitting this data (prevents creator updates) | |
| PaddingGenerator | mPaddingGenerator |
| Optional padding generator for block-size alignment. | |
Friends | |
| template<typename T, typename... Args> | |
| fl::shared_ptr< T > | fl::make_shared (Args &&... args) FL_NOEXCEPT |
| Friend declaration for make_shared to access private constructor. | |