|
Zephyr Project API 3.5.0
A Scalable Open Source RTOS
|
Charger Interface. More...
Data Structures | |
| union | charger_propval |
| container for a charger_property value More... | |
| struct | charger_driver_api |
| Charging device API. More... | |
Typedefs | |
| typedef uint16_t | charger_prop_t |
| A charger property's identifier. | |
| typedef int(* | charger_get_property_t) (const struct device *dev, const charger_prop_t prop, union charger_propval *val) |
| Callback API for getting a charger property. | |
| typedef int(* | charger_set_property_t) (const struct device *dev, const charger_prop_t prop, const union charger_propval *val) |
| Callback API for setting a charger property. | |
Enumerations | |
| enum | charger_property { CHARGER_PROP_ONLINE = 0 , CHARGER_PROP_PRESENT , CHARGER_PROP_STATUS , CHARGER_PROP_COMMON_COUNT , CHARGER_PROP_CUSTOM_BEGIN = CHARGER_PROP_COMMON_COUNT + 1 , CHARGER_PROP_MAX = UINT16_MAX } |
| Runtime Dynamic Battery Parameters. More... | |
| enum | charger_online { CHARGER_ONLINE_OFFLINE = 0 , CHARGER_ONLINE_FIXED , CHARGER_ONLINE_PROGRAMMABLE } |
| External supply states. More... | |
| enum | charger_status { CHARGER_STATUS_UNKNOWN = 0 , CHARGER_STATUS_CHARGING , CHARGER_STATUS_DISCHARGING , CHARGER_STATUS_NOT_CHARGING , CHARGER_STATUS_FULL } |
| Charging states. More... | |
Functions | |
| int | charger_get_prop (const struct device *dev, const charger_prop_t prop, union charger_propval *val) |
| Fetch a battery charger property. | |
| int | charger_set_prop (const struct device *dev, const charger_prop_t prop, const union charger_propval *val) |
| Set a battery charger property. | |
Charger Interface.
| charger_get_property_t |
#include <include/zephyr/drivers/charger.h>
Callback API for getting a charger property.
See charger_get_property() for argument description
#include <include/zephyr/drivers/charger.h>
A charger property's identifier.
See charger_property for a list of identifiers
| charger_set_property_t |
#include <include/zephyr/drivers/charger.h>
Callback API for setting a charger property.
See charger_set_property() for argument description
| enum charger_online |
#include <include/zephyr/drivers/charger.h>
External supply states.
| enum charger_property |
#include <include/zephyr/drivers/charger.h>
Runtime Dynamic Battery Parameters.
| enum charger_status |
#include <include/zephyr/drivers/charger.h>
Charging states.
| int charger_get_prop | ( | const struct device * | dev, |
| const charger_prop_t | prop, | ||
| union charger_propval * | val | ||
| ) |
#include <include/zephyr/drivers/charger.h>
Fetch a battery charger property.
| dev | Pointer to the battery charger device |
| prop | Charger property to get |
| val | Pointer to charger_propval union |
| 0 | if successful |
| < | 0 if getting property failed |
| int charger_set_prop | ( | const struct device * | dev, |
| const charger_prop_t | prop, | ||
| const union charger_propval * | val | ||
| ) |
#include <include/zephyr/drivers/charger.h>
Set a battery charger property.
| dev | Pointer to the battery charger device |
| prop | Charger property to set |
| val | Pointer to charger_propval union |
| 0 | if successful |
| < | 0 if setting property failed |