|
FastLED 3.10.6
|
| u8 fl::anonymous_namespace{uart_wave_encoder.cpp.hpp}::buildUartByte | ( | u8 | pulses_a, |
| u8 | pulses_b, | ||
| u8 | pulses_per_bit = 5 ) |
Build a UART data byte from two LED bit pulse counts.
Constructs the 8-bit UART data value that, with TX inversion and LSB-first transmission, produces the desired wire waveform.
Wire model (10 bits with TX inversion): [START=H] [~D0] [~D1] [~D2] [~D3] [~D4] [~D5] [~D6] [~D7] [STOP=L]
LED bit A occupies positions 0-4 (START + D0..D3): START is always HIGH (1 pulse guaranteed) D0..D3 set HIGH for (pulses_a - 1) additional pulses, then LOW
LED bit B occupies positions 5-9 (D4..D7 + STOP): D4 must be HIGH for leading edge (1 pulse guaranteed) D5..D7 set HIGH for (pulses_b - 1) additional pulses, then LOW STOP is always LOW
| pulses_a | HIGH pulse count for LED bit A [1, 4] |
| pulses_b | HIGH pulse count for LED bit B [1, 4] |
Definition at line 66 of file uart_wave_encoder.cpp.hpp.
References buildUartByte(), fl::FL_NO_EXCEPT, and fl::P().
Referenced by buildUartByte().
Here is the call graph for this function:
Here is the caller graph for this function: