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

◆ encodeUartByte() [2/2]

FASTLED_FORCE_INLINE FL_IRAM FL_OPTIMIZE_FUNCTION void fl::detail::encodeUartByte ( u8 led_byte,
u8 * output,
const Wave10Lut & lut )

Encode 1 LED byte to 4 UART bytes using a Wave10 LUT.

Parameters
led_byteLED data byte (8 bits)
outputOutput buffer (must have space for 4 bytes)
lutWave10 lookup table

Definition at line 175 of file uart_wave_encoder.h.

175 {
176 output[0] = encodeUart2Bits((led_byte >> 6) & 0x03, lut); // Bits 7-6
177 output[1] = encodeUart2Bits((led_byte >> 4) & 0x03, lut); // Bits 5-4
178 output[2] = encodeUart2Bits((led_byte >> 2) & 0x03, lut); // Bits 3-2
179 output[3] = encodeUart2Bits((led_byte >> 0) & 0x03, lut); // Bits 1-0
180}
FASTLED_FORCE_INLINE FL_IRAM FL_OPTIMIZE_FUNCTION u8 encodeUart2Bits(u8 two_bits, const Wave10Lut &lut) FL_NO_EXCEPT
Encode 2 LED bits to 1 UART byte using a Wave10 LUT.

References encodeUart2Bits(), and fl::FL_NO_EXCEPT.

Referenced by fl::encodeLedsToUart(), and fl::encodeLedsToUart().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: