Embassy
cyw43

Crates

git

Versions

default

Flavors

Trait cyw43::SpiBusCyw43

source ·
pub trait SpiBusCyw43 {
    // Required methods
    async fn cmd_write(&mut self, write: &[u32]) -> u32;
    async fn cmd_read(&mut self, write: u32, read: &mut [u32]) -> u32;

    // Provided method
    async fn wait_for_event(&mut self) { ... }
}
Expand description

Custom Spi Trait that only supports the bus operation of the cyw43 Implementors are expected to hold the CS pin low during an operation.

Required Methods§

source

async fn cmd_write(&mut self, write: &[u32]) -> u32

Issues a write command on the bus First 32 bits of word are expected to be a cmd word

source

async fn cmd_read(&mut self, write: u32, read: &mut [u32]) -> u32

Issues a read command on the bus write is expected to be a 32 bit cmd word read will contain the response of the device Backplane reads have a response delay that produces one extra unspecified word at the beginning of read. Callers that want to read n word from the backplane, have to provide a slice that is n+1 words long.

Provided Methods§

source

async fn wait_for_event(&mut self)

Wait for events from the Device. A typical implementation would wait for the IRQ pin to be high. The default implementation always reports ready, resulting in active polling of the device.

Object Safety§

This trait is not object safe.

Implementors§