|
Zephyr Project API 3.6.0
A Scalable Open Source RTOS
|
Charger Interface. More...
Data Structures | |
| struct | charger_current_notifier |
| The input current thresholds for the charger to notify the system. More... | |
| 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. | |
| typedef int(* | charger_charge_enable_t) (const struct device *dev, const bool enable) |
| Callback API enabling or disabling a charge cycle. | |
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. | |
| int | charger_charge_enable (const struct device *dev, const bool enable) |
| Enable or disable a charge cycle. | |
Charger Interface.
| charger_charge_enable_t |
#include <include/zephyr/drivers/charger.h>
Callback API enabling or disabling a charge cycle.
See charger_charge_enable() for argument description
| 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_charge_type |
#include <include/zephyr/drivers/charger.h>
Charge algorithm types.
| enum charger_health |
#include <include/zephyr/drivers/charger.h>
Charger health conditions.
These conditions determine the ability to, or the rate of, charge
#include <include/zephyr/drivers/charger.h>
Charger severity levels for system notifications.
| 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.
#include <include/zephyr/drivers/charger.h>
Enable or disable a charge cycle.
| dev | Pointer to the battery charger device |
| enable | true enables a charge cycle, false disables a charge cycle |
| 0 | if successful |
| -EIO | if communication with the charger failed |
| -EINVAL | if the conditions for initiating charging are invalid |
| 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 |