pub struct Timing {
pub time_0_low: u16,
pub time_0_high: u16,
pub time_1_low: u16,
pub time_1_high: u16,
pub reset_us: u16,
}Expand description
Defines the timing for a certain smart LED type.
All common smart LEDs are controlled by sending PWM-like pulses, in two different configurations for high and low. The required timings (and tolerances) can be found in the relevant datasheets.
Provided timings: SK68XX_TIMING, WS2812B_TIMING, WS2811_TIMING, WS2812_TIMING.
Fields§
§time_0_low: u16Low time for zero pulse, in nanoseconds.
time_0_high: u16High time for zero pulse, in nanoseconds.
time_1_low: u16Low time for one pulse, in nanoseconds.
time_1_high: u16High time for one pulse, in nanoseconds.
reset_us: u16Time for the reset that is required in between transmissions, in microseconds. Depending on the rmt’s frequency, it can have a maximum of ~800us at 80mhz, ~2000us at 32mhz, etc.
The calculation is: max_reset_pulse_us = 0xfffe / rmt_freq_mhz.
0xfffe(= 0x7fff * 2) is the max amount of ticks in a single PulseCode.