Add power enabled check to power API (#68)
This commit is contained in:
committed by
GitHub
parent
632d7ccccf
commit
28c456e2d9
@@ -8,12 +8,14 @@ extern "C" {
|
||||
#include <stdint.h>
|
||||
|
||||
typedef bool (*PowerIsCharging)();
|
||||
typedef bool (*PowerIsChargingEnabled)();
|
||||
typedef void (*PowerSetChargingEnabled)(bool enabled);
|
||||
typedef uint8_t (*PowerGetBatteryCharge)(); // Power value [0, 255] which maps to 0-100% charge
|
||||
typedef int32_t (*PowerGetCurrent)(); // Consumption or charge current in mAh
|
||||
|
||||
typedef struct {
|
||||
PowerIsCharging is_charging;
|
||||
PowerIsChargingEnabled is_charging_enabled;
|
||||
PowerSetChargingEnabled set_charging_enabled;
|
||||
PowerGetBatteryCharge get_charge_level;
|
||||
PowerGetCurrent get_current;
|
||||
|
||||
Reference in New Issue
Block a user