FastLED 3.10.6
Loading...
Searching...
No Matches

◆ wave3_convert_byte_to_wave3byte()

void fl::detail::wave3_convert_byte_to_wave3byte ( u8 byte_value,
const Wave3BitExpansionLut & lut,
Wave3Byte * output )

Convert one byte to a Wave3Byte using the nibble LUT.

Split-nibble path (high nibble + low nibble); bit-identical output to a wave3-eligible chipset's expected pulse pattern.

Definition at line 23 of file wave3.cpp.hpp.

25 {
26 u16 high_pattern = lut.lut[(byte_value >> 4) & 0xF];
27 u16 low_pattern = lut.lut[byte_value & 0xF];
28
29 output->data[0] = (u8)(high_pattern >> 4);
30 output->data[1] = (u8)(((high_pattern & 0xF) << 4) | ((low_pattern >> 8) & 0xF));
31 output->data[2] = (u8)(low_pattern & 0xFF);
32}
unsigned char u8
Definition stdint.h:131
u8 data[3]
Definition wave3.h:21

References fl::FL_NO_EXCEPT.

Referenced by fl::wave3(), fl::wave3Transpose_16(), fl::wave3Transpose_2(), fl::wave3Transpose_4(), and fl::wave3Transpose_8().

+ Here is the caller graph for this function: