FastLED 3.9.15
Loading...
Searching...
No Matches

◆ CPixelView() [2/3]

template<class PIXEL_TYPE>
CPixelView< PIXEL_TYPE >::CPixelView ( PIXEL_TYPE * _leds,
int _len )
inline

PixelSet constructor for a pixel set starting at the given PIXEL_TYPE* and going for _len leds.

Note that the length can be backwards, creating a PixelSet that walks backwards over the data

Parameters
_ledspointer to the raw LED data
_lenhow many LEDs in this set

Definition at line 83 of file pixelset.h.

83: dir(_len < 0 ? -1 : 1), len(_len), leds(_leds), end_pos(_leds + _len) {}
PIXEL_TYPE *const leds
pointer to the LED data
Definition pixelset.h:72
const int8_t dir
direction of the LED data, either 1 or -1. Determines how the pointer is incremented.
Definition pixelset.h:69
PIXEL_TYPE *const end_pos
pointer to the end position of the LED data
Definition pixelset.h:73
const int len
length of the LED data, in PIXEL_TYPE units.
Definition pixelset.h:70
Represents a set of LED objects.
Definition pixelset.h:67