#spi #driver #helper #package #mocking #pin #cs

embedded-spi

Rust embedded driver helper package (new releases at spi-hal)

15 releases

0.6.2 Jun 24, 2020
0.6.1 Jan 20, 2020
0.6.0 Dec 12, 2019
0.5.8 Jul 11, 2019
0.1.0 Apr 25, 2019

#1448 in Embedded development

38 downloads per month

MIT license

42KB
947 lines

spi-hal

Previously known as embedded-spi, new releases at crates.io/crates/spi-hal. A helper package for rust-embedded SPI traits and implementations, including testing approactes prior to proposing additions to embedded-hal.

This provides:

  • A Transactional SPI interface (https://github.com/rust-embedded/embedded-hal/pull/191)
  • A CS pin trait to communicate CS control for drivers
  • a Wrapper type to provide this for an SPI and OutputPin implementation
  • a Hal that abstracts over a number of SPI implementations to assist with writing driver utilities
  • a Mock helper for testing drivers based on this
  • a set of compatibility shims for c FFI use with dependency injected drivers

Status

GitHub tag Build Status Crates.io Docs.rs

Open Issues

Dependencies

~0.1–1.7MB
~27K SLoC