embassy-net-esp-hosted

Crates

git

Versions

default

Flavors

Interface

Trait Interface 

Source
pub trait Interface {
    // Required methods
    async fn wait_for_handshake(&mut self);
    async fn wait_for_ready(&mut self);
    async fn transfer(&mut self, rx: &mut [u8], tx: &[u8]);
}
Expand description

Physical interface trait for communicating with the ESP chip.

Required Methods§

Source

async fn wait_for_handshake(&mut self)

Wait for the HANDSHAKE signal indicating the ESP is ready for a new transaction.

Source

async fn wait_for_ready(&mut self)

Wait for the READY signal indicating the ESP has data to send.

Source

async fn transfer(&mut self, rx: &mut [u8], tx: &[u8])

Perform a SPI transfer, exchanging data with the ESP chip.

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<SPI, IN> Interface for SpiInterface<SPI, IN>
where SPI: SpiDevice, IN: InputPin + Wait,