SPI-based driver for shift registers
This is an embedded Rust driver for shift registers (such as 74HC595).
Features
- Fast communication using SPI peripheral.
- Implements
OutputPin
trait.- Pins of shift registers can be accessed (and passed to other libraries) like microcontroller pins.
- Supports unlimited daisy chain.
- Size is specified using const generics
Usage
// Initialize a 8-bit shift register
let shift_reg: = new;
// Get an array of individual pins
let mut pins = shift_reg.split;
// Set state of a pin
pins.set_high.unwrap;
pins.set_low.unwrap;
spi
is an SPI driver object which implements SpiDevice
.