#spi #testing #embedded-hal #helper


Rust embedded FFI helper and testing package

9 unstable releases (3 breaking)

✓ Uses Rust 2018 edition

new 0.5.5 May 21, 2019
0.5.4 May 21, 2019
0.4.0 May 14, 2019
0.2.0 May 7, 2019
0.1.0 Apr 25, 2019

37 downloads per month

MIT license

850 lines


A helper / testing package for rust-embedded SPI traits and implementations, to try out some more interesting approaches prior to proposing additions to embedded-hal. This provides a Transactional SPI interface, as well as a Wrapper type to provide this for an SPI and OutputPin implementation, a Mock helper for testing drivers based on this, and a set of compatibility shims for c FFI use with dependency injected drivers.


GitHub tag Build Status Crates.io Docs.rs

Open Issues


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, as well as some other common driver helpers.

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.


~21K SLoC