Crates.io | bq27xxx |
lib.rs | bq27xxx |
version | 0.0.2 |
source | src |
created_at | 2023-10-26 12:51:19.056626 |
updated_at | 2023-12-24 21:30:19.470858 |
description | BQ27xxx (bq27426, bq27427) platform-agnostic driver |
homepage | |
repository | https://github.com/dossalab/bq27xxx-rs |
max_upload_size | |
id | 1014447 |
size | 17,612 |
BQ27xxx is a Texas Instruments (TI) series of fuel gauges - i.e special kind of chips used to monitor the health of lithium batteries.
This exact driver was developed on BQ27427 - a rather new part with integrated sensing resistor. I suspect that other chips can (or already are) supported - feel free to send me the patch if you notice any differences. The I2C interface here is slow and a bit quirky, so some commands may take seconds of processing time. In 'traditional' C-style driver this either requires blocking (i.e waiting until each operation is completed), or writing a state machine with state transition and error handling logic. Writing such driver is async Rust makes everything so much easier!