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

◆ buildWave8ByteExpansionLUT()

Wave8ByteExpansionLut fl::buildWave8ByteExpansionLUT ( const Wave8BitExpansionLut & nibble)

Build a byte-indexed expansion LUT (#2526) from the nibble LUT.

Entry b is the concatenation of the high-nibble expansion (symbols[0..3]) and the low-nibble expansion (symbols[4..7]) — bit-identical to what wave8_convert_byte_to_wave8byte() produces. Not for ISR use.

Definition at line 313 of file wave8.cpp.hpp.

313 {
314 Wave8ByteExpansionLut out;
315 for (int b = 0; b < 256; ++b) {
316 const Wave8Bit *hi = nibble.lut[(b >> 4) & 0xF];
317 const Wave8Bit *lo = nibble.lut[b & 0xF];
318 for (int i = 0; i < 4; ++i) {
319 out.lut[b].symbols[i] = hi[i];
320 out.lut[b].symbols[i + 4] = lo[i];
321 }
322 }
323 return out;
324}
Type-safe container for packed 8-bit wave pulse pattern.
Definition wave8.h:22