4 releases
0.2.0 | Aug 26, 2024 |
---|---|
0.1.2 | Aug 26, 2024 |
0.1.1 | Oct 16, 2023 |
0.1.0 | Oct 16, 2023 |
#657 in Embedded development
19KB
283 lines
AXP192 Power Management IC, Rust library
Example
examples/m5stack-core2.rs
demonstrates configuring and reading from the
AXP192 on an M5Stack Core2.
This example uses the Rust on ESP toolchain and esp32-hal crate, which requires some setup.
You can run this example on your device with cargo run --example m5stack-core2
.
lib.rs
:
AXP192 power management chip interface
Axp192::new
is the starting-point interface for this crate.
Some devices which include this IC:
- M5Stack Core 2 (including the Core 2 for AWS variant)
- M5Stack Tough
- M5StickC
- M5StickC PLUS
Warning! This chip probably controls power to the microcontroller you are running the code on, and bricking the entire device is a possibility!
This implementation does not yet completely cover the functionality of the IC. If there's a feature you'd like to see implemented, either open an issue or create a pull request :)
Datasheet: https://github.com/m5stack/M5-Schematic/blob/master/Core/AXP192%20Datasheet_v1.1_en_draft_2211.pdf
Dependencies
~56KB