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

◆ encodeLedsToUart() [1/2]

FL_IRAM FL_OPTIMIZE_FUNCTION size_t fl::encodeLedsToUart ( const u8 * input,
size_t input_size,
u8 * output,
size_t output_capacity )

Legacy encoding using hardcoded WS2812 LUT (backward compat)

Definition at line 314 of file uart_wave_encoder.cpp.hpp.

317 {
318 size_t required_size = input_size * 4;
319
320 if (required_size > output_capacity) {
321 return 0;
322 }
323
324 for (size_t i = 0; i < input_size; ++i) {
325 detail::encodeUartByte(input[i], &output[i * 4]);
326 }
327
328 return required_size;
329}
FASTLED_FORCE_INLINE FL_IRAM FL_OPTIMIZE_FUNCTION void encodeUartByte(u8 led_byte, u8 *output, const Wave10Lut &lut) FL_NO_EXCEPT
Encode 1 LED byte to 4 UART bytes using a Wave10 LUT.

References fl::detail::encodeUartByte(), and FL_NO_EXCEPT.

+ Here is the call graph for this function: