FastLED 3.10.6
Loading...
Searching...
No Matches
fl::Wave10Lut Struct Reference

Detailed Description

Wave lookup table for UART LED encoding (waveN family)

Maps 2 LED bits to 1 UART data byte, computed from chipset timing. The UART frame (with TX inversion) is treated as two P-pulse LED bit slots, where P = pulses_per_bit:

  • P = 5 (wave10, 8 data bits + start/stop = 10-bit frame) – the classic geometry: baud = 5/period.
  • P = 4 (wave8-frame, 6 data bits + start/stop = 8-bit frame) – 20% lower baud (4/period): reaches faster chipsets under the ESP32's 5 Mbps cap and provides an alternative quantization grid (e.g. SK6812's T0H/T1H are exact multiples of period/4).

buildWave10Lut() evaluates both geometries and picks the feasible one with the smaller quantization error (preferring P=5 on ties).

Valid HIGH pulse count per LED bit: [1, P-1]

  • Bit A: START=H provides 1 guaranteed HIGH; the slot's final pulse must be LOW for the H->L transition
  • Bit B: first data pulse must be HIGH for the leading edge; STOP=L provides the trailing LOW

Definition at line 77 of file uart_wave_encoder.h.

#include <uart_wave_encoder.h>

Public Member Functions

u32 baudRate (const ChipsetTimingConfig &timing) const FL_NO_EXCEPT
 Baud rate this LUT's geometry requires for the timing (baud = P / bit_period; one UART bit per pulse).
 
u8 dataBits () const FL_NO_EXCEPT
 UART word length for this geometry (2P - 2 data bits)
 

Static Public Member Functions

static u32 computeBaudRate (const ChipsetTimingConfig &timing) FL_NO_EXCEPT
 Legacy fixed-wave10 baud computation (P = 5)
 

Public Attributes

u8 lut [4]
 2-bit input -> UART data byte
 
u8 pulses_per_bit
 Frame geometry: 5 (wave10) or 4 (wave8-frame); 0 = infeasible.
 

The documentation for this struct was generated from the following file: