60 static ChannelDataPtr
create(
71 static ChannelDataPtr
create(
166 template<
typename T,
typename... Args>
u8 getExtraZeroBitsPerByte() const FL_NO_EXCEPT
Clockless zero bits the wire appends after every encoded byte.
const fl::vector_psram< u8 > & getData() const FL_NO_EXCEPT
Get the encoded transmission data.
void setExtraZeroBitsPerByte(u8 bits) FL_NO_EXCEPT
Set the per-byte trailing zero-bit count (see getter)
~ChannelData()
Destructor with debug logging.
const ChipsetTimingConfig & getTiming() const FL_NO_EXCEPT
Get the timing configuration (clockless chipsets only)
bool isSpi() const FL_NO_EXCEPT
Check if this is an SPI chipset.
void setPixelFormat(ChannelPixelFormat pixelFormat) FL_NO_EXCEPT
Set explicit pixel byte layout for encoded data.
ChannelData(const ChipsetVariant &chipset, fl::vector_psram< u8 > &&encodedData, ChannelPixelFormat pixelFormat) FL_NO_EXCEPT
Private constructor - variant-based (modern API)
const ChipsetVariant & getChipset() const FL_NO_EXCEPT
Get the chipset configuration variant.
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)
bool isInUse() const FL_NO_EXCEPT
Check if channel data is currently in use by the driver.
ChannelPixelFormat getPixelFormat() const FL_NO_EXCEPT
Get explicit pixel byte layout for encoded data.
u8 getBytesPerPixel() const FL_NO_EXCEPT
Get encoded bytes per pixel/element, or 0 if unknown.
void writeWithPadding(fl::span< u8 > dst) FL_NO_EXCEPT
Write encoded data with padding to destination buffer.
ChipsetVariant mChipset
Chipset configuration (clockless or SPI)
size_t getSize() const FL_NO_EXCEPT
Get the data size in bytes.
volatile bool mInUse
Engine is transmitting this data (prevents creator updates)
fl::vector_psram< u8 > & getData() FL_NO_EXCEPT
Get the encoded transmission data (mutable)
ChannelData(const ChannelData &) FL_NO_EXCEPT=delete
void setPaddingGenerator(PaddingGenerator generator) FL_NO_EXCEPT
Set the padding generator for this channel.
void setInUse(bool inUse) FL_NO_EXCEPT
Mark channel data as in use by the driver.
u8 mExtraZeroBits
Trailing zero bits per byte (legacy XTRA0)
bool isClockless() const FL_NO_EXCEPT
Check if this is a clockless chipset.
ChannelPixelFormat mPixelFormat
Explicit byte layout for encoded data.
ChannelData & operator=(const ChannelData &) FL_NO_EXCEPT=delete
size_t getMinimumSize() const FL_NO_EXCEPT
Calculate the size needed for writeWithPadding() without allocating.
fl::vector_psram< u8 > mEncodedData
Encoded transmission bytes (PSRAM)
int getPin() const FL_NO_EXCEPT
Get the GPIO pin number.
PaddingGenerator mPaddingGenerator
Optional padding generator for block-size alignment.
Transmission data for a single LED channel.
constexpr remove_reference< T >::type && move(T &&t) FL_NO_EXCEPT
shared_ptr< T > make_shared(Args &&... args) FL_NO_EXCEPT
u8 u8 fract8 blur_amount FL_NO_EXCEPT
fl::string format(const char *fmt) FL_NO_EXCEPT
Format with no arguments.
fl::function< void(fl::span< const u8 > src, fl::span< u8 > dst)> PaddingGenerator
Padding generator function type.
fl::variant< ClocklessChipset, SpiChipsetConfig > ChipsetVariant
ChannelPixelFormat
Pixel byte layout carried by encoded channel data.
u8 channelPixelFormatBytesPerPixel(ChannelPixelFormat format) FL_NO_EXCEPT
Base definition for an LED controller.
#define FASTLED_SHARED_PTR(type)
Runtime bit-period timing for a clockless chipset.
Clockless chipset configuration (single data pin)
SPI chipset configuration (data + clock pins)