FastLED 3.6.0
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 259 of file controller.h.

#include <controller.h>

Public Member Functions

 PixelController (const PixelController &other)
 Copy constructor.
 
void initOffsets (int len)
 Initialize the PixelController::mOffsets array based on the length of the strip.
 
 PixelController (const uint8_t *d, int len, CRGB &s, EDitherMode dither=BINARY_DITHER, bool advance=true, uint8_t skip=0)
 Constructor.
 
 PixelController (const CRGB *d, int len, CRGB &s, EDitherMode dither=BINARY_DITHER)
 Constructor.
 
 PixelController (const CRGB &d, int len, CRGB &s, EDitherMode dither=BINARY_DITHER)
 Constructor.
 
void init_binary_dithering ()
 Set up the values for binary dithering.
 
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()).
 
int size ()
 Get the length of the LED strip.
 
int lanes ()
 Get the number of lanes of the Controller.
 
int advanceBy ()
 Get the amount to advance the pointer by.
 
void advanceData ()
 Advance the data pointer forward, adjust position counter.
 
void stepDithering ()
 Step the dithering forward.
 
void preStepFirstByteDithering ()
 Some chipsets pre-cycle the first byte, which means we want to cycle byte 0's dithering separately.
 
uint8_t loadAndScale0 (int lane, uint8_t scale)
 non-template alias of loadAndScale<0>()
 
uint8_t loadAndScale1 (int lane, uint8_t scale)
 non-template alias of loadAndScale<1>()
 
uint8_t loadAndScale2 (int lane, uint8_t scale)
 non-template alias of loadAndScale<2>()
 
uint8_t advanceAndLoadAndScale0 (int lane, uint8_t scale)
 non-template alias of advanceAndLoadAndScale<0>()
 
uint8_t stepAdvanceAndLoadAndScale0 (int lane, uint8_t scale)
 stepDithering() and advanceAndLoadAndScale0()
 
uint8_t loadAndScale0 (int lane)
 non-template alias of loadAndScale<0>()
 
uint8_t loadAndScale1 (int lane)
 non-template alias of loadAndScale<1>()
 
uint8_t loadAndScale2 (int lane)
 non-template alias of loadAndScale<2>()
 
uint8_t advanceAndLoadAndScale0 (int lane)
 non-template alias of advanceAndLoadAndScale<0>()
 
uint8_t stepAdvanceAndLoadAndScale0 (int lane)
 stepDithering() and advanceAndLoadAndScale0()
 
uint8_t loadAndScale0 ()
 non-template alias of loadAndScale<0>()
 
uint8_t loadAndScale1 ()
 non-template alias of loadAndScale<1>()
 
uint8_t loadAndScale2 ()
 non-template alias of loadAndScale<2>()
 
uint8_t advanceAndLoadAndScale0 ()
 non-template alias of advanceAndLoadAndScale<0>()
 
uint8_t stepAdvanceAndLoadAndScale0 ()
 stepDithering() and advanceAndLoadAndScale0()
 
uint8_t getScale0 ()
 non-template alias of getscale<0>()
 
uint8_t getScale1 ()
 non-template alias of getscale<1>()
 
uint8_t getScale2 ()
 non-template alias of getscale<2>()
 

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 uint8_t loadByte (PixelController &pc)
 Read a byte of LED data.
 
template<int SLOT>
static uint8_t loadByte (PixelController &pc, int lane)
 Read a byte of LED data for parallel output.
 
template<int SLOT>
static uint8_t dither (PixelController &pc, uint8_t b)
 Calculate a dither value using the per-channel dither data.
 
template<int SLOT>
static uint8_t dither (PixelController &, uint8_t b, uint8_t d)
 Calculate a dither value.
 
template<int SLOT>
static uint8_t scale (PixelController &pc, uint8_t b)
 Scale a value using the per-channel scale data.
 
template<int SLOT>
static 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 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 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 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 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 uint8_t advanceAndLoadAndScale (PixelController &pc)
 A version of loadAndScale() that advances the output data pointer.
 
template<int SLOT>
static uint8_t advanceAndLoadAndScale (PixelController &pc, int lane)
 A version of loadAndScale() that advances the output data pointer.
 
template<int SLOT>
static 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 uint8_t getd (PixelController &pc)
 Gets the dithering data for the provided output slot.
 
template<int SLOT>
static 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
 
CRGB mScale
 the per-channel scale values, provided by a color correction function such as CLEDController::computeAdjustment()
 
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
 

Constructor & Destructor Documentation

◆ PixelController() [1/4]

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 271 of file controller.h.

◆ PixelController() [2/4]

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

Constructor.

Parameters
dpointer to LED data
lenlength of the LED data
sLED scale values, as CRGB struct
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 302 of file controller.h.

◆ PixelController() [3/4]

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

Constructor.

Parameters
dpointer to LED data
lenlength of the LED data
sLED scale values, as CRGB struct
ditherdither setting for the LEDs

Definition at line 314 of file controller.h.

◆ PixelController() [4/4]

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

Constructor.

Parameters
dpointer to LED data
lenlength of the LED data
sLED scale values, as CRGB struct
ditherdither setting for the LEDs

Definition at line 325 of file controller.h.

Member Function Documentation

◆ advanceAndLoadAndScale() [1/3]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static 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 548 of file controller.h.

◆ advanceAndLoadAndScale() [2/3]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static 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 553 of file controller.h.

◆ advanceAndLoadAndScale() [3/3]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static 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 559 of file controller.h.

◆ advanceAndLoadAndScale0() [1/3]

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

non-template alias of advanceAndLoadAndScale<0>()

Definition at line 604 of file controller.h.

◆ advanceAndLoadAndScale0() [2/3]

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

non-template alias of advanceAndLoadAndScale<0>()

Definition at line 598 of file controller.h.

◆ advanceAndLoadAndScale0() [3/3]

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

non-template alias of advanceAndLoadAndScale<0>()

Definition at line 592 of file controller.h.

◆ advanceBy()

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

Get the amount to advance the pointer by.

Returns
PixelController::mAdvance

Definition at line 454 of file controller.h.

◆ advanceData()

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

Advance the data pointer forward, adjust position counter.

Definition at line 457 of file controller.h.

◆ dither() [1/2]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static 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 498 of file controller.h.

◆ dither() [2/2]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static 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 493 of file 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 437 of file controller.h.

◆ getd()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static 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 574 of file controller.h.

◆ getscale()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static 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 581 of file controller.h.

◆ getScale0()

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

non-template alias of getscale<0>()

Definition at line 607 of file controller.h.

◆ getScale1()

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

non-template alias of getscale<1>()

Definition at line 608 of file controller.h.

◆ getScale2()

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

non-template alias of getscale<2>()

Definition at line 609 of file controller.h.

◆ has()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
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 428 of file 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 372 of file 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 287 of file controller.h.

◆ lanes()

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

Get the number of lanes of the Controller.

Returns
LANES from template

Definition at line 450 of file controller.h.

◆ loadAndScale() [1/4]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static 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 522 of file controller.h.

◆ loadAndScale() [2/4]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static 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 528 of file controller.h.

◆ loadAndScale() [3/4]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static 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 536 of file controller.h.

◆ loadAndScale() [4/4]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static 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 543 of file controller.h.

◆ loadAndScale0() [1/3]

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

non-template alias of loadAndScale<0>()

Definition at line 601 of file controller.h.

◆ loadAndScale0() [2/3]

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

non-template alias of loadAndScale<0>()

Definition at line 595 of file controller.h.

◆ loadAndScale0() [3/3]

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

non-template alias of loadAndScale<0>()

Definition at line 589 of file controller.h.

◆ loadAndScale1() [1/3]

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

non-template alias of loadAndScale<1>()

Definition at line 602 of file controller.h.

◆ loadAndScale1() [2/3]

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

non-template alias of loadAndScale<1>()

Definition at line 596 of file controller.h.

◆ loadAndScale1() [3/3]

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

non-template alias of loadAndScale<1>()

Definition at line 590 of file controller.h.

◆ loadAndScale2() [1/3]

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

non-template alias of loadAndScale<2>()

Definition at line 603 of file controller.h.

◆ loadAndScale2() [2/3]

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

non-template alias of loadAndScale<2>()

Definition at line 597 of file controller.h.

◆ loadAndScale2() [3/3]

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

non-template alias of loadAndScale<2>()

Definition at line 591 of file controller.h.

◆ loadByte() [1/2]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static 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 481 of file controller.h.

◆ loadByte() [2/2]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static 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 486 of file controller.h.

◆ preStepFirstByteDithering()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
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 470 of file controller.h.

◆ scale() [1/2]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static 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 510 of file controller.h.

◆ scale() [2/2]

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
template<int SLOT>
static 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 505 of file controller.h.

◆ size()

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

Get the length of the LED strip.

Returns
PixelController::mLen

Definition at line 446 of file controller.h.

◆ stepAdvanceAndLoadAndScale0() [1/3]

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

stepDithering() and advanceAndLoadAndScale0()

Definition at line 605 of file controller.h.

◆ stepAdvanceAndLoadAndScale0() [2/3]

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

stepDithering() and advanceAndLoadAndScale0()

Definition at line 599 of file controller.h.

◆ stepAdvanceAndLoadAndScale0() [3/3]

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

stepDithering() and advanceAndLoadAndScale0()

Definition at line 593 of file controller.h.

◆ stepDithering()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t MASK = 0xFFFFFFFF>
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 461 of file 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 263 of file 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 264 of file 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 266 of file 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 260 of file 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 261 of file 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 262 of file 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 267 of file controller.h.

◆ mScale

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

the per-channel scale values, provided by a color correction function such as CLEDController::computeAdjustment()

Definition at line 265 of file controller.h.


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