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

◆ encodeUart2Bits() [1/2]

FASTLED_FORCE_INLINE FL_IRAM FL_OPTIMIZE_FUNCTION u8 fl::detail::encodeUart2Bits ( u8 two_bits)

Legacy 2-bit encoding using hardcoded WS2812 LUT (backward compat)

Parameters
two_bits2-bit value (0-3)
Returns
UART data byte (8 bits)

Definition at line 186 of file uart_wave_encoder.h.

186 {
187 // Hardcoded WS2812 LUT for backward compatibility with existing tests
188 static constexpr u8 kWs2812Lut[4] = {0xEF, 0x8F, 0xEC, 0x8C};
189 return kWs2812Lut[two_bits & 0x03];
190}
unsigned char u8
Definition stdint.h:131

References fl::FL_NO_EXCEPT.