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§
Sourcefn init(&mut self)
fn init(&mut self)
Initializes all controls pins to set ready communication with the NINA firmware.
Sourcefn reset<D: DelayMs<u16>>(&mut self, delay: &mut D)
fn reset<D: DelayMs<u16>>(&mut self, delay: &mut D)
Resets communication with the NINA firmware.
Sourcefn esp_select(&mut self)
fn esp_select(&mut self)
Tells the NINA firmware we’re about to send it a protocol command.
Sourcefn esp_deselect(&mut self)
fn esp_deselect(&mut self)
Tells the NINA firmware we’re done sending it a protocol command.
Sourcefn get_esp_ready(&self) -> bool
fn get_esp_ready(&self) -> bool
Is the NINA firmware ready to send it a protocol command?
Sourcefn get_esp_ack(&self) -> bool
fn get_esp_ack(&self) -> bool
Is the NINA firmware ready to receive more commands? Also referred to as BUSY.
Sourcefn wait_for_esp_ready(&self)
fn wait_for_esp_ready(&self)
Blocking waits for the NINA firmware to be ready to send it a protocol command.
Sourcefn wait_for_esp_ack(&self)
fn wait_for_esp_ack(&self)
Blocking waits for the NINA firmware to acknowledge it’s ready to receive more commands.
Sourcefn wait_for_esp_select(&mut self)
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.