FastLED 3.10.8
Loading...
Searching...
No Matches

◆ writeLPD8806Wide()

template<typename OutputIterator>
void fl::PixelIterator::writeLPD8806Wide ( OutputIterator back_ins)
inline

LPD8806 over a colour-managed channel's 16-bit drives, quantized once to the chip's 7 bits (B3: one final quantization).

The 8-bit path rounds to 8 bits and then shifts, which is two, and its encoder also forces the low bit on every lit value below 254. Same framing as encodeLPD8806: three 0x80 | code bytes per LED in wire order, then (n * 3 + 63) / 64 zero latch bytes.

Definition at line 581 of file pixel_iterator.h.

581 {
582 fl::size num_leds = 0;
583 while (has(1)) {
584 u16 w[3];
585 loadAndScaleRGB16(&w[0], &w[1], &w[2]); // wire order
586 for (int c = 0; c < 3; ++c) {
587 const u32 code = (static_cast<u32>(w[c]) * 127u + 32767u) / 65535u;
588 *back_ins++ = static_cast<u8>(0x80 | code);
589 }
591 advanceData();
592 ++num_leds;
593 }
594 const fl::size latch = (num_leds * 3 + 63) / 64;
595 for (fl::size i = 0; i < latch; ++i) {
596 *back_ins++ = 0x00;
597 }
598 }
void advanceData() FL_NO_EXCEPT
int size() FL_NO_EXCEPT
void loadAndScaleRGB16(u16 *r_out, u16 *g_out, u16 *b_out) FL_NO_EXCEPT
One pixel at the source's own precision, wire-ordered.
bool has(int n) FL_NO_EXCEPT
void stepDithering() FL_NO_EXCEPT
unsigned char u8
Definition stdint.h:131

References advanceData(), fl::FL_NO_EXCEPT, has(), loadAndScaleRGB16(), and stepDithering().

+ Here is the call graph for this function: