Crate max7219_driver
source · [−]Expand description
This crate provides a platform agnostic driver for the MAX7219 LED Driver IC.
This driver was built using the embedded-hal traits.
Usage
An updated version of the library should be available on crates.io. Add the following to your Cargo.toml to get is a dependency.
[dependencies]
max7219-driver = "*"Instantiating
Create an instance of the driver with the new method, by passing SPI and Output pin instances.
use max7219-driver::MAX7219;
let spi = // SPI instantiation code
let cs = // Output pin instantiation code
let mut max7219 = MAX7219::new(spi, cs).unwrap();Initializing
Initialize the driver instance with the init_display method. A boolean needs to be specified to indicate whether to clear the display after init or not.
max7219.init_display(true);Structs
The MAX7219 Driver that initializes and communicates with the MAX7219 IC or chain of ICs.
Enums
Enumeration of commands in the register map of the MAX7219.
Enumeration of the MAX7219 decode modes for BCD encoded input.
Enumeration of the MAX7219 digit/row addresses
Enumeration of the MAX7219 display test modes
Possible Errors that can be raised either during communication with the MAX7219 chip over SPI or controlling the chip select pin.
Enumeration of the MAX7219 supported LED intensity values.
Enumeration of the MAX7219 display scan limits
Enumeration of the MAX7219 power modes.
Constants
This is a constant for convenience so that the SPI module can be configured with the correct SPI mode compatible the MAX7219 device