embassy-net-esp-hosted

Crates

git

Versions

default

Flavors

Interface

Trait Interface 

Source
pub trait Interface {
    // Required methods
    async fn init(&mut self, cold_boot: bool);
    async fn wait_for_handshake(&mut self);
    async fn wait_for_ready(&mut self);
    async fn transfer(&mut self, buffer: &mut Aligned<A4, [u8]>, tx_len: usize);
}
Expand description

Physical interface trait for communicating with the ESP chip.

Required Methods§

Source

async fn init(&mut self, cold_boot: bool)

Initialize or re-initialize the transport.

Source

async fn wait_for_handshake(&mut self)

Wait for the ESP to indicate readiness for a new transaction.

Source

async fn wait_for_ready(&mut self)

Wait for the ESP to indicate that it has data to send.

Source

async fn transfer(&mut self, buffer: &mut Aligned<A4, [u8]>, tx_len: usize)

Perform a transfer, exchanging data with the ESP chip.

tx_len is the number of bytes in the payload.

The payload bytes contain the valid length of the received buffer.

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<B: MmcBus, D: DelayNs> Interface for SdioInterface<B, D>

Source§

impl<D, DR> Interface for HdSpiInterface<D, DR>
where D: HdSpi, DR: InputPin + Wait,

Source§

impl<SPI, IN> Interface for SpiInterface<SPI, IN>
where SPI: SpiDevice, IN: InputPin + Wait,