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

◆ encodeWS2812()

template<typename InputIterator, typename OutputIterator>
void fl::encodeWS2812 ( InputIterator first,
InputIterator last,
OutputIterator out,
const Rgbw & rgbw )

Encode pixel data in WS2812 format (automatic RGB/RGBW selection)

Template Parameters
InputIteratorIterator yielding fl::array<u8, 3> or fl::array<u8, 4>
OutputIteratorOutput iterator accepting uint8_t
Parameters
firstIterator to first pixel
lastIterator past last pixel
outOutput iterator for encoded bytes
rgbwRgbw configuration (if active, uses RGBW mode)
Note
Dispatches to RGB or RGBW encoder based on rgbw.active()

Definition at line 73 of file ws2812.h.

73 {
74 if (rgbw.active()) {
75 encodeWS2812_RGBW(first, last, out);
76 } else {
77 encodeWS2812_RGB(first, last, out);
78 }
79}
Rgbw rgbw
void encodeWS2812_RGB(InputIterator first, InputIterator last, OutputIterator out) FL_NOEXCEPT
Encode 3-byte pixel data in WS2812 format.
Definition ws2812.h:35
void encodeWS2812_RGBW(InputIterator first, InputIterator last, OutputIterator out) FL_NOEXCEPT
Encode 4-byte pixel data in WS2812 format.
Definition ws2812.h:53

References encodeWS2812_RGB(), encodeWS2812_RGBW(), FL_NOEXCEPT, and rgbw.

+ Here is the call graph for this function: