fuel_gauge: Add basic stub API doc.

Add a short stub doc as a placeholder for future documentation on the fuel
gauge API.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
This commit is contained in:
Aaron Massey 2022-11-18 13:59:37 -07:00 committed by Anas Nashif
parent 2dd0b48140
commit 5fa1abf1cb
4 changed files with 53 additions and 0 deletions

View file

@ -109,6 +109,10 @@ between major releases are available in the :ref:`zephyr_release_notes`.
- Stable
- 1.11
* - :ref:`fuel_gauge_api`
- Experimental
- 3.3
* - :ref:`flash_map_api`
- Stable
- 1.11

View file

@ -0,0 +1,37 @@
.. _fuel_gauge_api:
Fuel Gauges (Experimental API Stub Doc)
#######################################
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 :c:struct:`fuel_gauge_get_property`. This
array is then populated by values as according to its `property_type` field.
Caching
=======
The Fuel Gauge API explicitly provides no caching for its clients.
.. _fuel_gauge_api_reference:
API Reference
*************
.. doxygengroup:: fuel_gauge_interface

View file

@ -20,6 +20,7 @@ Peripherals
eeprom.rst
entropy.rst
flash.rst
fuel_gauge.rst
gna.rst
gpio.rst
hwinfo.rst

View file

@ -7,6 +7,13 @@
#ifndef ZEPHYR_INCLUDE_DRIVERS_BATTERY_H_
#define ZEPHYR_INCLUDE_DRIVERS_BATTERY_H_
/**
* @brief Fuel Gauge Interface
* @defgroup fuel_gauge_interface Fuel Gauge Interface
* @ingroup io_interfaces
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
@ -128,6 +135,10 @@ __subsystem struct battery_driver_api {
fuel_gauge_get_property_t get_property;
};
/**
* @}
*/
#ifdef __cplusplus
}
#endif /* __cplusplus */