This is a Hardware Abstraction Layer (HAL) for battery fuel gauges and battery chargers used in embedded systems, with the goal of being hardware and platform independent.
Specifically, traits are defined for both battery fuel gauges and battery chargers with functionality that conforms to the Smart Battery System v1.1 (SBS) specification.
Drivers for fuel gauges and charging controllers should implement these traits to provide a standard way of interfacing with the device.
Additionally, the ACPI Specification's Power Source and Power Meter Devices battery control messages are defined as an supplementary superset of the Smart Battery specification, for users building systems compliant with ACPI.
Crate | Description |
---|---|
embedded-batteries | Core traits, ACPI battery control methods, blocking version |
embedded-batteries-async | Core traits, ACPI battery control methods, async version |
Currently, rust 1.83
and up is supported.
Licensed under the terms of the MIT license.
Unless you explicitly state otherwise, any contribution submitted for inclusion in the work by you shall be licensed under the terms of the MIT license.
License: MIT