7 releases (breaking)
0.7.0 | Jan 12, 2024 |
---|---|
0.6.0 | Jan 11, 2024 |
0.5.0 | Jun 30, 2023 |
0.4.0 | Jan 19, 2023 |
0.1.0 | Oct 11, 2022 |
#908 in Embedded development
31 downloads per month
27KB
558 lines
Rust MAX11214 Driver
Usage
Add this to your Cargo.toml
:
[dependencies]
max112x = "0.7"
lib.rs
:
Driver for MAX11214 and similar 24-bit Delta-Sigma ADCs implemented using platform-agnostic embedded-hal
traits.
Implemented according to https://datasheets.maximintegrated.com/en/ds/MAX11214.pdf.
Usage
#
#
use max112x::{Max11214, State};
let mut adc = Max11214::new(spi);
// Get status.
let status = adc.status()?;
assert_eq!(status.state(), State::PowerDown);
// Switch to standby mode.
let mut adc = adc.into_standby()?;
// Get status.
let status = adc.status()?;
assert_eq!(status.state(), State::Standby);
// Release the SPI peripheral again.
let spi = adc.release();
drop(spi);
Dependencies
~160KB