LTC2949 Rust driver
ltc2949 is a no_std Rust driver for the Analog Devices
LTC2949 current, voltage,
charge, and energy monitor. It uses the embedded-hal SPI traits and supports
an LTC2949 on its own or connected in parallel with an LTC68xx cell-monitor
daisy chain on the same isoSPI bus.
The driver provides register configuration, slow and fast measurement access, accumulator readings, status and fault information, FIFO handling, and NTC and shunt-temperature compensation. Required waits are returned to the application instead of blocking inside the driver.
Example
The following function wakes the monitor, starts continuous measurement, and reads the battery voltage:
use ;
use ;
See the Rust documentation for detailed examples, configuration options, timing requirements, and shared-bus usage with LTC68xx cell monitors.
Contributing
Contributions are welcome. Before opening a pull request, please:
- run the test suite with
cargo test; - format the code with
cargo fmt; - add or update tests for behavioral changes.
For the complete contribution guidelines, see DEVELOPMENT.md.
License
This project is dual-licensed under either of the following licenses, at your option: