Trait EspControlInterface

Source
pub trait EspControlInterface {
    // Required methods
    fn init(&mut self);
    fn reset<D: DelayMs<u16>>(&mut self, delay: &mut D);
    fn esp_select(&mut self);
    fn esp_deselect(&mut self);
    fn get_esp_ready(&self) -> bool;
    fn get_esp_ack(&self) -> bool;
    fn wait_for_esp_ready(&self);
    fn wait_for_esp_ack(&self);
    fn wait_for_esp_select(&mut self);
}
Expand description

Provides an internal pin interface that abstracts the extra control lines that are separate from a data bus (e.g. SPI/I2C).

Not meant to be used outside of the crate.

Required Methods§

Source

fn init(&mut self)

Initializes all controls pins to set ready communication with the NINA firmware.

Source

fn reset<D: DelayMs<u16>>(&mut self, delay: &mut D)

Resets communication with the NINA firmware.

Source

fn esp_select(&mut self)

Tells the NINA firmware we’re about to send it a protocol command.

Source

fn esp_deselect(&mut self)

Tells the NINA firmware we’re done sending it a protocol command.

Source

fn get_esp_ready(&self) -> bool

Is the NINA firmware ready to send it a protocol command?

Source

fn get_esp_ack(&self) -> bool

Is the NINA firmware ready to receive more commands? Also referred to as BUSY.

Source

fn wait_for_esp_ready(&self)

Blocking waits for the NINA firmware to be ready to send it a protocol command.

Source

fn wait_for_esp_ack(&self)

Blocking waits for the NINA firmware to acknowledge it’s ready to receive more commands.

Source

fn wait_for_esp_select(&mut self)

Blocking waits for the NINA firmware to be ready to send it a protocol command.

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<CS, GPIO0, RESETN, ACK> EspControlInterface for EspControlPins<CS, GPIO0, RESETN, ACK>
where CS: OutputPin, GPIO0: OutputPin, RESETN: OutputPin, ACK: InputPin,