Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
|
Fuel gauge backend emulator APIs . More...
Functions | |
int | emul_fuel_gauge_set_battery_charging (const struct emul *target, uint32_t uV, int uA) |
Set charging for fuel gauge associated battery. | |
int | emul_fuel_gauge_is_battery_cutoff (const struct emul *target, bool *cutoff) |
Check if the battery has been cut off. | |
Fuel gauge backend emulator APIs .
#include <zephyr/drivers/emul_fuel_gauge.h>
Check if the battery has been cut off.
target | Pointer to the emulator structure for the fuel gauge emulator instance. |
cutoff | Pointer to bool storing variable. |
0 | If successful. |
-ENOTSUP | if not supported by emulator. |
#include <zephyr/drivers/emul_fuel_gauge.h>
Set charging for fuel gauge associated battery.
Set how much the battery associated with a fuel gauge IC is charging or discharging. Where voltage is always positive and a positive or negative current denotes charging or discharging, respectively.
target | Pointer to the emulator structure for the fuel gauge emulator instance. |
uV | Microvolts describing the battery voltage. |
uA | Microamps describing the battery current where negative is discharging. |
0 | If successful. |
-EINVAL | if mV or mA are 0. |