|
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)
Implemented in cdc::hal::BQ25895Power.
|
pure virtual |
Get battery percentage (0-100)
Implemented in cdc::hal::BQ25895Power.
|
pure virtual |
Get battery voltage in mV
Implemented in cdc::hal::BQ25895Power.
|
pure virtual |
Get charging status
Implemented in cdc::hal::BQ25895Power.
|
pure virtual |
Get current power source
Implemented in cdc::hal::BQ25895Power.
|
pure virtual |
Check if battery is critical (<5%)
Implemented in cdc::hal::BQ25895Power.
|
pure virtual |
Check if battery is low (<20%)
Implemented in cdc::hal::BQ25895Power.
|
pure virtual |
Check if battery is physically connected
Implemented in cdc::hal::BQ25895Power.
|
pure virtual |
Check if USB is connected
Implemented in cdc::hal::BQ25895Power.
|
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.
Implemented in cdc::hal::BQ25895Power.
|
pure virtual |
Enable/disable charging
Implemented in cdc::hal::BQ25895Power.
|
pure virtual |
Update power status (poll from main loop)
Implemented in cdc::hal::BQ25895Power.