Delay

Trait Delay 

Source
pub trait Delay {
    const ADDRESS_SETUP_TIME: u16 = 60u16;
    const ENABLE_PULSE_WIDTH: u16 = 450u16;
    const DATA_HOLD_TIME: u16 = 20u16;
    const COMMAND_EXECUTION_TIME: u16 = 37u16;

    // Required method
    fn delay_ns(ns: u16);

    // Provided method
    fn delay_us(us: u16) { ... }
}
Expand description

The Delay trait is used to adapt the timing to the specific hardware and must be implemented by the libary user.

Provided Associated Constants§

Source

const ADDRESS_SETUP_TIME: u16 = 60u16

The time (ns) between register select (RS) and read/write (R/W) to enable signal (E).

Source

const ENABLE_PULSE_WIDTH: u16 = 450u16

The duration (ns) the enable signal is set to High.

Source

const DATA_HOLD_TIME: u16 = 20u16

The duration (ns) the data pins will be set after the enable signal was dropped.

Source

const COMMAND_EXECUTION_TIME: u16 = 37u16

The maximum execution time of instruction commands.

Required Methods§

Source

fn delay_ns(ns: u16)

Wait for the given amount of nanoseconds.

Provided Methods§

Source

fn delay_us(us: u16)

Wait for the given amount of microseconds.

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§