Skip to content

Latest commit

 

History

History
47 lines (30 loc) · 1.37 KB

fuel_gauge.rst

File metadata and controls

47 lines (30 loc) · 1.37 KB

Fuel Gauge

The fuel gauge subsystem exposes an API to uniformly access battery fuel gauge devices. Currently, only reading data is supported.

Note: This API is currently experimental and this doc will be significantly changed as new features are added to the API.

Basic Operation

Properties

Fundamentally, a property is a quantity that a fuel gauge device can measure.

Fuel gauges typically support multiple properties, such as temperature readings of the battery-pack or present-time current/voltage.

Properties are fetched using a client allocated array of :cfuel_gauge_get_property. This array is then populated by values as according to its property_type field.

Battery Cutoff

Many fuel gauges embedded within battery packs expose a register address that when written to with a specific payload will do a battery cutoff. This battery cutoff is often referred to as ship, shelf, or sleep mode due to its utility in reducing battery drain while devices are stored or shipped.

The fuel gauge API exposes battery cutoff with the :cfuel_gauge_battery_cutoff function.

Caching

The Fuel Gauge API explicitly provides no caching for its clients.

API Reference

fuel_gauge_interface

fuel_gauge_emulator_backend