|
PebbleOS v4.47.0-505-g4bbc630fa
|
#include <stdbool.h>Functions | |
| void | battery_charger_init (void) |
| Start reporting external power changes as battery connection events. | |
| bool | battery_is_usb_connected (void) |
| Check whether USB power is connected. | |
| bool | battery_charge_controller_thinks_we_are_charging (void) |
| Check whether the charger reports charging. | |
| void | battery_force_charge_enable (bool is_charging) |
| Force charging on or off. | |
| bool battery_charge_controller_thinks_we_are_charging | ( | void | ) |
Check whether the charger reports charging.
This is the raw charger status, not the notion of charging used by the rest of the system, which comes from the battery state service. Always false while charging is forced off with battery_force_charge_enable().
| void battery_charger_init | ( | void | ) |
Start reporting external power changes as battery connection events.
| void battery_force_charge_enable | ( | bool | is_charging | ) |
Force charging on or off.
While forced off, battery_is_usb_connected() and battery_charge_controller_thinks_we_are_charging() report false.
| is_charging | True to allow charging, false to force it off. |
| bool battery_is_usb_connected | ( | void | ) |
Check whether USB power is connected.
Always false while charging is forced off with battery_force_charge_enable().