FastLED 3.9.3
Loading...
Searching...
No Matches
PixelController< RGB_ORDER, LANES, MASK > Struct Template Reference

Detailed Description

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
struct PixelController< RGB_ORDER, LANES, MASK >

Pixel controller class.

This is the class that we use to centralize pixel access in a block of data, including support for things like RGB reordering, scaling, dithering, skipping (for ARGB data), and eventually, we will centralize 8/12/16 conversions here as well.

Template Parameters
RGB_ORDERthe rgb ordering for the LEDs (e.g. what order red, green, and blue data is written out in)
LANEShow many parallel lanes of output to write
MASKbitmask for the output lanes

Definition at line 71 of file pixel_controller.h.

#include <pixel_controller.h>

Public Types

enum  { kLanes = LANES , kMask = MASK }
 

Public Member Functions

PixelIterator as_iterator (const Rgbw &rgbw)
 
void disableColorAdjustment ()
 
 PixelController (const PixelController &other)
 Copy constructor.
 
template<EOrder RGB_ORDER_OTHER>
 PixelController (const PixelController< RGB_ORDER_OTHER, LANES, MASK > &other)
 
template<typename PixelControllerT >
void copy (const PixelControllerT &other)
 
void initOffsets (int len)
 Initialize the PixelController::mOffsets array based on the length of the strip.
 
 PixelController (const uint8_t *d, int len, ColorAdjustment color_adjustment, EDitherMode dither, bool advance, uint8_t skip)
 Constructor.
 
 PixelController (const CRGB *d, int len, ColorAdjustment color_adjustment, EDitherMode dither)
 Constructor.
 
 PixelController (const CRGB &d, int len, ColorAdjustment color_adjustment, EDitherMode dither)
 Constructor.
 
void init_binary_dithering ()
 Set up the values for binary dithering.
 
FASTLED_FORCE_INLINE bool has (int n)
 Do we have n pixels left to process?
 
void enable_dithering (EDitherMode dither)
 Toggle dithering enable If dithering is set to enabled, this will re-init the dithering values (init_binary_dithering()).
 
FASTLED_FORCE_INLINE int size ()
 Get the length of the LED strip.
 
FASTLED_FORCE_INLINE int lanes ()
 Get the number of lanes of the Controller.
 
FASTLED_FORCE_INLINE int advanceBy ()
 Get the amount to advance the pointer by.
 
FASTLED_FORCE_INLINE void advanceData ()
 Advance the data pointer forward, adjust position counter.
 
FASTLED_FORCE_INLINE void stepDithering ()
 Step the dithering forward.
 
FASTLED_FORCE_INLINE void preStepFirstByteDithering ()
 Some chipsets pre-cycle the first byte, which means we want to cycle byte 0's dithering separately.
 
FASTLED_FORCE_INLINE uint8_t loadAndScale0 (int lane, uint8_t scale)
 non-template alias of loadAndScale<0>()
 
FASTLED_FORCE_INLINE uint8_t loadAndScale1 (int lane, uint8_t scale)
 non-template alias of loadAndScale<1>()
 
FASTLED_FORCE_INLINE uint8_t loadAndScale2 (int lane, uint8_t scale)
 non-template alias of loadAndScale<2>()
 
FASTLED_FORCE_INLINE uint8_t advanceAndLoadAndScale0 (int lane, uint8_t scale)
 non-template alias of advanceAndLoadAndScale<0>()
 
FASTLED_FORCE_INLINE uint8_t stepAdvanceAndLoadAndScale0 (int lane, uint8_t scale)
 stepDithering() and advanceAndLoadAndScale0()
 
FASTLED_FORCE_INLINE uint8_t loadAndScale0 (int lane)
 non-template alias of loadAndScale<0>()
 
FASTLED_FORCE_INLINE uint8_t loadAndScale1 (int lane)
 non-template alias of loadAndScale<1>()
 
FASTLED_FORCE_INLINE uint8_t loadAndScale2 (int lane)
 non-template alias of loadAndScale<2>()
 
FASTLED_FORCE_INLINE uint8_t advanceAndLoadAndScale0 (int lane)
 non-template alias of advanceAndLoadAndScale<0>()
 
FASTLED_FORCE_INLINE uint8_t stepAdvanceAndLoadAndScale0 (int lane)
 stepDithering() and advanceAndLoadAndScale0()
 
FASTLED_FORCE_INLINE uint8_t loadAndScale0 ()
 non-template alias of loadAndScale<0>()
 
FASTLED_FORCE_INLINE uint8_t loadAndScale1 ()
 non-template alias of loadAndScale<1>()
 
FASTLED_FORCE_INLINE uint8_t loadAndScale2 ()
 non-template alias of loadAndScale<2>()
 
FASTLED_FORCE_INLINE uint8_t advanceAndLoadAndScale0 ()
 non-template alias of advanceAndLoadAndScale<0>()
 
FASTLED_FORCE_INLINE uint8_t stepAdvanceAndLoadAndScale0 ()
 stepDithering() and advanceAndLoadAndScale0()
 
FASTLED_FORCE_INLINE uint8_t getScale0 ()
 non-template alias of getscale<0>()
 
FASTLED_FORCE_INLINE uint8_t getScale1 ()
 non-template alias of getscale<1>()
 
FASTLED_FORCE_INLINE uint8_t getScale2 ()
 non-template alias of getscale<2>()
 
FASTLED_FORCE_INLINE void loadAndScale_APA102_HD (uint8_t *b0_out, uint8_t *b1_out, uint8_t *b2_out, uint8_t *brightness_out)
 
FASTLED_FORCE_INLINE void loadAndScaleRGB (uint8_t *b0_out, uint8_t *b1_out, uint8_t *b2_out)
 
FASTLED_FORCE_INLINE void loadAndScaleRGBW (Rgbw rgbw, uint8_t *b0_out, uint8_t *b1_out, uint8_t *b2_out, uint8_t *b3_out)
 

Static Public Member Functions

Template'd static functions for output

These functions are used for retrieving LED data for the LED chipset output controllers.

template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t loadByte (PixelController &pc)
 Read a byte of LED data.
 
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t loadByte (PixelController &pc, int lane)
 Read a byte of LED data for parallel output.
 
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t dither (PixelController &pc, uint8_t b)
 Calculate a dither value using the per-channel dither data.
 
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t dither (PixelController &, uint8_t b, uint8_t d)
 Calculate a dither value.
 
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t scale (PixelController &pc, uint8_t b)
 Scale a value using the per-channel scale data.
 
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t scale (PixelController &, uint8_t b, uint8_t scale)
 Scale a value.
 
Composite shortcut functions for loading, dithering, and scaling

These composite functions will load color data, dither it, and scale it all at once so that it's ready for the output controller to send to the LEDs.

template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t loadAndScale (PixelController &pc)
 Loads, dithers, and scales a single byte for a given output slot, using class dither and scale values.
 
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t loadAndScale (PixelController &pc, int lane)
 Loads, dithers, and scales a single byte for a given output slot and lane, using class dither and scale values.
 
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t loadAndScale (PixelController &pc, int lane, uint8_t d, uint8_t scale)
 Loads, dithers, and scales a single byte for a given output slot and lane.
 
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t loadAndScale (PixelController &pc, int lane, uint8_t scale)
 Loads and scales a single byte for a given output slot and lane.
 
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t advanceAndLoadAndScale (PixelController &pc)
 A version of loadAndScale() that advances the output data pointer.
 
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t advanceAndLoadAndScale (PixelController &pc, int lane)
 A version of loadAndScale() that advances the output data pointer.
 
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t advanceAndLoadAndScale (PixelController &pc, int lane, uint8_t scale)
 A version of loadAndScale() that advances the output data pointer without dithering.
 
Data retrieval functions

These functions retrieve channel-specific data from the class, arranged in output order.

template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t getd (PixelController &pc)
 Gets the dithering data for the provided output slot.
 
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t getscale (PixelController &pc)
 Gets the scale data for the provided output slot.
 

Public Attributes

const uint8_t * mData
 pointer to the underlying LED data
 
int mLen
 number of LEDs in the data for one lane
 
int mLenRemaining
 counter for the number of LEDs left to process
 
uint8_t d [3]
 values for the scaled dither signal
 
uint8_t e [3]
 values for the scaled dither signal
 
int8_t mAdvance
 how many bytes to advance the pointer by each time. For CRGB this is 3.
 
int mOffsets [LANES]
 the number of bytes to offset each lane from the starting pointer
 
ColorAdjustment mColorAdjustment
 

Member Enumeration Documentation

◆ anonymous enum

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
anonymous enum

Definition at line 81 of file pixel_controller.h.

Constructor & Destructor Documentation

◆ PixelController() [1/5]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
PixelController< RGB_ORDER, LANES, MASK >::PixelController ( const PixelController< RGB_ORDER, LANES, MASK > & other)
inline

Copy constructor.

Parameters
otherthe object to copy

Definition at line 99 of file pixel_controller.h.

◆ PixelController() [2/5]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<EOrder RGB_ORDER_OTHER>
PixelController< RGB_ORDER, LANES, MASK >::PixelController ( const PixelController< RGB_ORDER_OTHER, LANES, MASK > & other)
inline

Definition at line 104 of file pixel_controller.h.

◆ PixelController() [3/5]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
PixelController< RGB_ORDER, LANES, MASK >::PixelController ( const uint8_t * d,
int len,
ColorAdjustment color_adjustment,
EDitherMode dither,
bool advance,
uint8_t skip )
inline

Constructor.

Parameters
dpointer to LED data
lenlength of the LED data
color_adjustmentLED scale values
ditherdither setting for the LEDs
advancewhether the pointer (d) should advance per LED
skipif the pointer is advancing, how many bytes to skip in addition to 3

Definition at line 142 of file pixel_controller.h.

◆ PixelController() [4/5]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
PixelController< RGB_ORDER, LANES, MASK >::PixelController ( const CRGB * d,
int len,
ColorAdjustment color_adjustment,
EDitherMode dither )
inline

Constructor.

Parameters
dpointer to LED data
lenlength of the LED data
color_adjustmentLED scale values
ditherdither setting for the LEDs

Definition at line 157 of file pixel_controller.h.

◆ PixelController() [5/5]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
PixelController< RGB_ORDER, LANES, MASK >::PixelController ( const CRGB & d,
int len,
ColorAdjustment color_adjustment,
EDitherMode dither )
inline

Constructor.

Parameters
dpointer to LED data
lenlength of the LED data
color_adjustmentLED scale values
ditherdither setting for the LEDs

Definition at line 171 of file pixel_controller.h.

Member Function Documentation

◆ advanceAndLoadAndScale() [1/3]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::advanceAndLoadAndScale ( PixelController< RGB_ORDER, LANES, MASK > & pc)
inlinestatic

A version of loadAndScale() that advances the output data pointer.

Parameters
pcreference to the pixel controller

Definition at line 405 of file pixel_controller.h.

◆ advanceAndLoadAndScale() [2/3]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::advanceAndLoadAndScale ( PixelController< RGB_ORDER, LANES, MASK > & pc,
int lane )
inlinestatic

A version of loadAndScale() that advances the output data pointer.

Parameters
pcreference to the pixel controller
lanethe parallel output lane to read the byte for

Definition at line 410 of file pixel_controller.h.

◆ advanceAndLoadAndScale() [3/3]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::advanceAndLoadAndScale ( PixelController< RGB_ORDER, LANES, MASK > & pc,
int lane,
uint8_t scale )
inlinestatic

A version of loadAndScale() that advances the output data pointer without dithering.

Parameters
pcreference to the pixel controller
lanethe parallel output lane to read the byte for
scalethe scale data for the byte

Definition at line 416 of file pixel_controller.h.

◆ advanceAndLoadAndScale0() [1/3]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::advanceAndLoadAndScale0 ( )
inline

non-template alias of advanceAndLoadAndScale<0>()

Definition at line 463 of file pixel_controller.h.

◆ advanceAndLoadAndScale0() [2/3]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::advanceAndLoadAndScale0 ( int lane)
inline

non-template alias of advanceAndLoadAndScale<0>()

Definition at line 455 of file pixel_controller.h.

◆ advanceAndLoadAndScale0() [3/3]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::advanceAndLoadAndScale0 ( int lane,
uint8_t scale )
inline

non-template alias of advanceAndLoadAndScale<0>()

Definition at line 449 of file pixel_controller.h.

◆ advanceBy()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE int PixelController< RGB_ORDER, LANES, MASK >::advanceBy ( )
inline

Get the amount to advance the pointer by.

Returns
PixelController::mAdvance

Definition at line 308 of file pixel_controller.h.

◆ advanceData()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE void PixelController< RGB_ORDER, LANES, MASK >::advanceData ( )
inline

Advance the data pointer forward, adjust position counter.

Definition at line 311 of file pixel_controller.h.

◆ as_iterator()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
PixelIterator PixelController< RGB_ORDER, LANES, MASK >::as_iterator ( const Rgbw & rgbw)
inline

Definition at line 86 of file pixel_controller.h.

◆ copy()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<typename PixelControllerT >
void PixelController< RGB_ORDER, LANES, MASK >::copy ( const PixelControllerT & other)
inline

Definition at line 109 of file pixel_controller.h.

◆ disableColorAdjustment()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
void PixelController< RGB_ORDER, LANES, MASK >::disableColorAdjustment ( )
inline

Definition at line 90 of file pixel_controller.h.

◆ dither() [1/2]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::dither ( PixelController< RGB_ORDER, LANES, MASK > & ,
uint8_t b,
uint8_t d )
inlinestatic

Calculate a dither value.

Template Parameters
SLOTThe data slot in the output stream. This is used to select which byte of the output stream is being processed.
Parameters
bthe color byte to dither
ddither data

Definition at line 354 of file pixel_controller.h.

◆ dither() [2/2]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::dither ( PixelController< RGB_ORDER, LANES, MASK > & pc,
uint8_t b )
inlinestatic

Calculate a dither value using the per-channel dither data.

Template Parameters
SLOTThe data slot in the output stream. This is used to select which byte of the output stream is being processed.
Parameters
pcreference to the pixel controller
bthe color byte to dither
See also
PixelController::d

Definition at line 348 of file pixel_controller.h.

◆ enable_dithering()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
void PixelController< RGB_ORDER, LANES, MASK >::enable_dithering ( EDitherMode dither)
inline

Toggle dithering enable If dithering is set to enabled, this will re-init the dithering values (init_binary_dithering()).

Otherwise it will clear the stored dithering data.

Parameters
ditherthe dither setting

Definition at line 291 of file pixel_controller.h.

◆ getd()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::getd ( PixelController< RGB_ORDER, LANES, MASK > & pc)
inlinestatic

Gets the dithering data for the provided output slot.

Template Parameters
SLOTThe data slot in the output stream. This is used to select which byte of the output stream is being processed.
Parameters
pcreference to the pixel controller
Returns
dithering data for the given channel
See also
PixelController::d

Definition at line 431 of file pixel_controller.h.

◆ getscale()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::getscale ( PixelController< RGB_ORDER, LANES, MASK > & pc)
inlinestatic

Gets the scale data for the provided output slot.

Template Parameters
SLOTThe data slot in the output stream. This is used to select which byte of the output stream is being processed.
Parameters
pcreference to the pixel controller
Returns
scale data for the given channel
See also
PixelController::mScale

Definition at line 438 of file pixel_controller.h.

◆ getScale0()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::getScale0 ( )
inline

non-template alias of getscale<0>()

Definition at line 466 of file pixel_controller.h.

◆ getScale1()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::getScale1 ( )
inline

non-template alias of getscale<1>()

Definition at line 467 of file pixel_controller.h.

◆ getScale2()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::getScale2 ( )
inline

non-template alias of getscale<2>()

Definition at line 468 of file pixel_controller.h.

◆ has()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE bool PixelController< RGB_ORDER, LANES, MASK >::has ( int n)
inline

Do we have n pixels left to process?

Parameters
nthe number to check against
Returns
'true' if there are more than n pixels left to process

Definition at line 282 of file pixel_controller.h.

◆ init_binary_dithering()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
void PixelController< RGB_ORDER, LANES, MASK >::init_binary_dithering ( )
inline

Set up the values for binary dithering.

Definition at line 226 of file pixel_controller.h.

◆ initOffsets()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
void PixelController< RGB_ORDER, LANES, MASK >::initOffsets ( int len)
inline

Initialize the PixelController::mOffsets array based on the length of the strip.

Parameters
lenthe number of LEDs in one lane of the strip

Definition at line 127 of file pixel_controller.h.

◆ lanes()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE int PixelController< RGB_ORDER, LANES, MASK >::lanes ( )
inline

Get the number of lanes of the Controller.

Returns
LANES from template

Definition at line 304 of file pixel_controller.h.

◆ loadAndScale() [1/4]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::loadAndScale ( PixelController< RGB_ORDER, LANES, MASK > & pc)
inlinestatic

Loads, dithers, and scales a single byte for a given output slot, using class dither and scale values.

Template Parameters
SLOTThe data slot in the output stream. This is used to select which byte of the output stream is being processed.
Parameters
pcreference to the pixel controller

Definition at line 379 of file pixel_controller.h.

◆ loadAndScale() [2/4]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::loadAndScale ( PixelController< RGB_ORDER, LANES, MASK > & pc,
int lane )
inlinestatic

Loads, dithers, and scales a single byte for a given output slot and lane, using class dither and scale values.

Template Parameters
SLOTThe data slot in the output stream. This is used to select which byte of the output stream is being processed.
Parameters
pcreference to the pixel controller
lanethe parallel output lane to read the byte for

Definition at line 385 of file pixel_controller.h.

◆ loadAndScale() [3/4]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::loadAndScale ( PixelController< RGB_ORDER, LANES, MASK > & pc,
int lane,
uint8_t d,
uint8_t scale )
inlinestatic

Loads, dithers, and scales a single byte for a given output slot and lane.

Template Parameters
SLOTThe data slot in the output stream. This is used to select which byte of the output stream is being processed.
Parameters
pcreference to the pixel controller
lanethe parallel output lane to read the byte for
dthe dither data for the byte
scalethe scale data for the byte

Definition at line 393 of file pixel_controller.h.

◆ loadAndScale() [4/4]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::loadAndScale ( PixelController< RGB_ORDER, LANES, MASK > & pc,
int lane,
uint8_t scale )
inlinestatic

Loads and scales a single byte for a given output slot and lane.

Template Parameters
SLOTThe data slot in the output stream. This is used to select which byte of the output stream is being processed.
Parameters
pcreference to the pixel controller
lanethe parallel output lane to read the byte for
scalethe scale data for the byte

Definition at line 400 of file pixel_controller.h.

◆ loadAndScale0() [1/3]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::loadAndScale0 ( )
inline

non-template alias of loadAndScale<0>()

Definition at line 460 of file pixel_controller.h.

◆ loadAndScale0() [2/3]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::loadAndScale0 ( int lane)
inline

non-template alias of loadAndScale<0>()

Definition at line 452 of file pixel_controller.h.

◆ loadAndScale0() [3/3]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::loadAndScale0 ( int lane,
uint8_t scale )
inline

non-template alias of loadAndScale<0>()

Definition at line 446 of file pixel_controller.h.

◆ loadAndScale1() [1/3]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::loadAndScale1 ( )
inline

non-template alias of loadAndScale<1>()

Definition at line 461 of file pixel_controller.h.

◆ loadAndScale1() [2/3]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::loadAndScale1 ( int lane)
inline

non-template alias of loadAndScale<1>()

Definition at line 453 of file pixel_controller.h.

◆ loadAndScale1() [3/3]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::loadAndScale1 ( int lane,
uint8_t scale )
inline

non-template alias of loadAndScale<1>()

Definition at line 447 of file pixel_controller.h.

◆ loadAndScale2() [1/3]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::loadAndScale2 ( )
inline

non-template alias of loadAndScale<2>()

Definition at line 462 of file pixel_controller.h.

◆ loadAndScale2() [2/3]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::loadAndScale2 ( int lane)
inline

non-template alias of loadAndScale<2>()

Definition at line 454 of file pixel_controller.h.

◆ loadAndScale2() [3/3]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::loadAndScale2 ( int lane,
uint8_t scale )
inline

non-template alias of loadAndScale<2>()

Definition at line 448 of file pixel_controller.h.

◆ loadAndScale_APA102_HD()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE void PixelController< RGB_ORDER, LANES, MASK >::loadAndScale_APA102_HD ( uint8_t * b0_out,
uint8_t * b1_out,
uint8_t * b2_out,
uint8_t * brightness_out )
inline

Definition at line 483 of file pixel_controller.h.

◆ loadAndScaleRGB()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE void PixelController< RGB_ORDER, LANES, MASK >::loadAndScaleRGB ( uint8_t * b0_out,
uint8_t * b1_out,
uint8_t * b2_out )
inline

Definition at line 512 of file pixel_controller.h.

◆ loadAndScaleRGBW()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE void PixelController< RGB_ORDER, LANES, MASK >::loadAndScaleRGBW ( Rgbw rgbw,
uint8_t * b0_out,
uint8_t * b1_out,
uint8_t * b2_out,
uint8_t * b3_out )
inline

Definition at line 519 of file pixel_controller.h.

◆ loadByte() [1/2]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::loadByte ( PixelController< RGB_ORDER, LANES, MASK > & pc)
inlinestatic

Read a byte of LED data.

Template Parameters
SLOTThe data slot in the output stream. This is used to select which byte of the output stream is being processed.
Parameters
pcreference to the pixel controller

Definition at line 335 of file pixel_controller.h.

◆ loadByte() [2/2]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::loadByte ( PixelController< RGB_ORDER, LANES, MASK > & pc,
int lane )
inlinestatic

Read a byte of LED data for parallel output.

Template Parameters
SLOTThe data slot in the output stream. This is used to select which byte of the output stream is being processed.
Parameters
pcreference to the pixel controller
lanethe parallel output lane to read the byte for

Definition at line 341 of file pixel_controller.h.

◆ preStepFirstByteDithering()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE void PixelController< RGB_ORDER, LANES, MASK >::preStepFirstByteDithering ( )
inline

Some chipsets pre-cycle the first byte, which means we want to cycle byte 0's dithering separately.

Definition at line 324 of file pixel_controller.h.

◆ scale() [1/2]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::scale ( PixelController< RGB_ORDER, LANES, MASK > & ,
uint8_t b,
uint8_t scale )
inlinestatic

Scale a value.

Template Parameters
SLOTThe data slot in the output stream. This is used to select which byte of the output stream is being processed.
Parameters
bthe byte to scale
scalethe scale value

Definition at line 367 of file pixel_controller.h.

◆ scale() [2/2]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::scale ( PixelController< RGB_ORDER, LANES, MASK > & pc,
uint8_t b )
inlinestatic

Scale a value using the per-channel scale data.

Template Parameters
SLOTThe data slot in the output stream. This is used to select which byte of the output stream is being processed.
Parameters
pcreference to the pixel controller
bthe color byte to scale
See also
PixelController::mScale

Definition at line 361 of file pixel_controller.h.

◆ size()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE int PixelController< RGB_ORDER, LANES, MASK >::size ( )
inline

Get the length of the LED strip.

Returns
PixelController::mLen

Definition at line 300 of file pixel_controller.h.

◆ stepAdvanceAndLoadAndScale0() [1/3]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::stepAdvanceAndLoadAndScale0 ( )
inline

◆ stepAdvanceAndLoadAndScale0() [2/3]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::stepAdvanceAndLoadAndScale0 ( int lane)
inline

◆ stepAdvanceAndLoadAndScale0() [3/3]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE uint8_t PixelController< RGB_ORDER, LANES, MASK >::stepAdvanceAndLoadAndScale0 ( int lane,
uint8_t scale )
inline

◆ stepDithering()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE void PixelController< RGB_ORDER, LANES, MASK >::stepDithering ( )
inline

Step the dithering forward.

Note
If updating here, be sure to update the asm version in clockless_trinket.h!

Definition at line 315 of file pixel_controller.h.

Member Data Documentation

◆ d

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
uint8_t PixelController< RGB_ORDER, LANES, MASK >::d[3]

values for the scaled dither signal

See also
init_binary_dithering()

Definition at line 75 of file pixel_controller.h.

◆ e

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
uint8_t PixelController< RGB_ORDER, LANES, MASK >::e[3]

values for the scaled dither signal

See also
init_binary_dithering()

Definition at line 76 of file pixel_controller.h.

◆ mAdvance

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
int8_t PixelController< RGB_ORDER, LANES, MASK >::mAdvance

how many bytes to advance the pointer by each time. For CRGB this is 3.

Definition at line 77 of file pixel_controller.h.

◆ mColorAdjustment

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
ColorAdjustment PixelController< RGB_ORDER, LANES, MASK >::mColorAdjustment

Definition at line 79 of file pixel_controller.h.

◆ mData

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
const uint8_t* PixelController< RGB_ORDER, LANES, MASK >::mData

pointer to the underlying LED data

Definition at line 72 of file pixel_controller.h.

◆ mLen

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
int PixelController< RGB_ORDER, LANES, MASK >::mLen

number of LEDs in the data for one lane

Definition at line 73 of file pixel_controller.h.

◆ mLenRemaining

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
int PixelController< RGB_ORDER, LANES, MASK >::mLenRemaining

counter for the number of LEDs left to process

Definition at line 74 of file pixel_controller.h.

◆ mOffsets

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
int PixelController< RGB_ORDER, LANES, MASK >::mOffsets[LANES]

the number of bytes to offset each lane from the starting pointer

See also
initOffsets()

Definition at line 78 of file pixel_controller.h.


The documentation for this struct was generated from the following file: