Skip to main content

Module spi

Module spi 

Source
Expand description

Async SPI bus wrapper.

Submits transfers via the C ove_spi_transfer_async API; the completion callback wakes a registered AtomicWaker. Per-peripheral state in the C storage struct enforces single-in-flight transfers — concurrent submissions return Error::BusBusy.

With the embedded-hal-async Cargo feature the wrapper additionally implements embedded_hal_async::spi::SpiBus<u8>, so any embedded-hal-async-aware sensor driver works on top of it.

Structs§

AsyncSpi
Async SPI bus master.
DmaSlot
Per-transfer slot — wakes the caller and stores the completion result. UnsafeCell rather than Mutex because we use atomics for the state field, and AtomicWaker is itself interior-mut-safe.