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

◆ encodeWS2812_RGBWW()

template<typename InputIterator, typename OutputIterator>
void fl::encodeWS2812_RGBWW ( InputIterator first,
InputIterator last,
OutputIterator out )

Encode 5-byte pixel data in WS2812 format (issue #2558, RGBWW).

Template Parameters
InputIteratorIterator yielding fl::array<u8, 5> (5 bytes in wire order: R, G, B, warm-W, cool-W after EOrder + EOrderWW placement)
OutputIteratorOutput iterator accepting uint8_t

Definition at line 86 of file ws2812.h.

86 {
87 while (first != last) {
88 const fl::array<u8, BYTES_PER_PIXEL_RGBWW>& pixel = *first;
89 *out++ = pixel[0];
90 *out++ = pixel[1];
91 *out++ = pixel[2];
92 *out++ = pixel[3];
93 *out++ = pixel[4];
94 ++first;
95 }
96}
A fixed-size array implementation similar to std::array.
Definition array.h:27

References FL_NOEXCEPT.

Referenced by fl::PixelIterator::writeWS2812().

+ Here is the caller graph for this function: