|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
#include <IPowerManager.h>
Public Member Functions | |
| virtual | ~IPowerManager ()=default |
| virtual uint16_t | getBatteryVoltage () const=0 |
| virtual uint8_t | getBatteryPercent () const=0 |
| virtual bool | isUsbConnected () const=0 |
| virtual PowerSource | getPowerSource () const=0 |
| virtual ChargeStatus | getChargeStatus () const=0 |
| virtual bool | isBatteryLow () const=0 |
| virtual bool | isBatteryCritical () const=0 |
| virtual bool | isBatteryPresent () const=0 |
| virtual void | setChargingEnabled (bool enabled)=0 |
| virtual void | enterShipMode ()=0 |
| virtual void | update ()=0 |
| virtual void | refresh ()=0 |
| Public Member Functions inherited from cdc::core::IService | |
| virtual | ~IService ()=default |
| virtual bool | init ()=0 |
| virtual bool | start ()=0 |
| virtual void | stop ()=0 |
| virtual ServiceState | getState () const =0 |
| virtual const char * | getName () const =0 |
Power Manager interface (BQ25895)
Definition at line 31 of file IPowerManager.h.
|
virtualdefault |
|
pure virtual |
Enable ship mode (deep power off)
|
pure virtual |
Get battery percentage (0-100)
|
pure virtual |
Get battery voltage in mV
|
pure virtual |
Get charging status
|
pure virtual |
Get current power source
|
pure virtual |
Check if battery is critical (<5%)
|
pure virtual |
Check if battery is low (<20%)
|
pure virtual |
Check if battery is physically connected
|
pure virtual |
Check if USB is connected
|
pure virtual |
Force a synchronous re-read of charger status registers. Bypasses the IRQ-driven cache so the caller observes the current hardware state. Intended for paths that need an up-to-date reading on demand, e.g. the lock-screen refresh.
|
pure virtual |
Enable/disable charging
|
pure virtual |
Update power status (poll from main loop)