[][src]Crate embedded_spi

Embedded SPI helper package This defines a higher level Transactional SPI interface, as well as an SPI Transaction enumeration that more closely map to the common uses of SPI peripherals.

An embedded_spi::wrapper::Wrapper type is provided to wrap existing SPI implementations in this embedded_spi::Transactional interface, as well as a set of helpers for C compatibility enabled with the compat feature, and a basic mocking adaptor enabled with the mock feature.

Modules

compat

Compatibility shims to allow C use of rust SPI peripherals This module provides mechanisms to convert an abstract Wrapper object to and from c void pointers, as well as C ffi compatible spi_read and spi_write functions using these context pointers.

mock
wrapper

Transactional SPI wrapper implementation This provides a Wrapper type that is generic over an embedded_hal::blocking::spi and embedded_hal::digital::v2::OutputPin to provide a transactional API for SPI transactions.

Enums

Error

Error type combining SPI and Pin errors for utility

Transaction

Transaction enum defines possible SPI transactions