FastLED 3.10.6
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 465 of file pixel_iterator.h.

465 {
466 fl::size num_leds = 0;
467 while (has(1)) {
468 u16 w[3];
469 loadAndScaleRGB16(&w[0], &w[1], &w[2]); // wire order
470 for (int c = 0; c < 3; ++c) {
471 const u32 code = (static_cast<u32>(w[c]) * 127u + 32767u) / 65535u;
472 *back_ins++ = static_cast<u8>(0x80 | code);
473 }
475 advanceData();
476 ++num_leds;
477 }
478 const fl::size latch = (num_leds * 3 + 63) / 64;
479 for (fl::size i = 0; i < latch; ++i) {
480 *back_ins++ = 0x00;
481 }
482 }
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: