Timing

Trait Timing 

Source
pub trait Timing {
    const TIME_0_LOW: u16;
    const TIME_0_HIGH: u16;
    const TIME_1_LOW: u16;
    const TIME_1_HIGH: u16;
}
Expand description

Common trait for all different smart LED dependent timings.

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: Sk68xxTiming, Ws2812bTiming, Ws2811Timing, Ws2812Timing

Required Associated Constants§

Source

const TIME_0_LOW: u16

Low time for zero pulse, in nanoseconds.

Source

const TIME_0_HIGH: u16

High time for zero pulse, in nanoseconds.

Source

const TIME_1_LOW: u16

Low time for one pulse, in nanoseconds.

Source

const TIME_1_HIGH: u16

High time for one pulse, in nanoseconds.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Timing for Sk68xxTiming

Source§

const TIME_0_HIGH: u16 = 320u16

Source§

const TIME_0_LOW: u16 = 880u16

Source§

const TIME_1_HIGH: u16 = 640u16

Source§

const TIME_1_LOW: u16 = 560u16

Source§

impl Timing for Ws2811LowSpeedTiming

Source§

const TIME_0_HIGH: u16 = 500u16

Source§

const TIME_0_LOW: u16 = 2_000u16

Source§

const TIME_1_HIGH: u16 = 1_200u16

Source§

const TIME_1_LOW: u16 = 1_300u16

Source§

impl Timing for Ws2811Timing

Source§

const TIME_0_HIGH: u16 = 250u16

Source§

const TIME_0_LOW: u16 = 1_000u16

Source§

const TIME_1_HIGH: u16 = 600u16

Source§

const TIME_1_LOW: u16 = 650u16

Source§

impl Timing for Ws2812Timing

Source§

const TIME_0_HIGH: u16 = 350u16

Source§

const TIME_0_LOW: u16 = 700u16

Source§

const TIME_1_HIGH: u16 = 800u16

Source§

const TIME_1_LOW: u16 = 600u16

Source§

impl Timing for Ws2812bTiming

Source§

const TIME_0_HIGH: u16 = 400u16

Source§

const TIME_0_LOW: u16 = 800u16

Source§

const TIME_1_HIGH: u16 = 850u16

Source§

const TIME_1_LOW: u16 = 450u16