Crates.io | max7301 |
lib.rs | max7301 |
version | 0.3.0 |
source | src |
created_at | 2019-03-10 03:34:28.984842 |
updated_at | 2021-07-27 05:51:43.015226 |
description | Driver for the MAX7301 serial I/O expander |
homepage | |
repository | https://github.com/edarc/max7301 |
max_upload_size | |
id | 119699 |
size | 77,257 |
Pure Rust driver for the Maxim MAX7301 serial I/O expander chip, for use with embedded-hal.
This driver is intended to work on embedded platforms using the embedded-hal
trait library. It is no_std
and does not require an allocator. The initial
release supports the MAX7301 which uses an SPI interface. I would like (and
have left interfaces) to extend it to support the MAX7300, which is an
equivalent device with an I2C interface instead.
The driver allows three different styles of using the device:
embedded-hal
traits,PortPin
instances that implement the InputPin
and OutputPin
traits,
where calling any methods from those traits immediately initiates a bus
transaction to perform the operation, andPortPin
instances, but where the HAL trait methods do not generate bus traffic
directly, but instead interact with a write-back cache inside the driver.
There are additional methods that control when the write-back cache is
refreshed or written back, and these methods permit the driver to exploit the
device's multi-port registers to reduce the amount of bus traffic and latency
substantially in situations where it makes sense.Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.