SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
Loading...
Searching...
No Matches
PmicChargerBase::Status Struct Reference

Charger status structure. More...

#include <PmicChargerBase.hpp>

Public Attributes

bool online = false
 PMIC reachable / initialized.
 
bool vbusPresent = false
 VBUS detected / good (USB power present)
 
bool batteryPresent = false
 Battery present and detected.
 
bool charging = false
 Charging state (coarse: true if in precharge/fastcharge)
 
bool chargeDone = false
 Charge termination/done (battery full)
 
bool fault = false
 Any fault latched/active.
 
uint32_t faultCode = 0
 Optional raw fault code for diagnostics.
 
ChargingStatus chargingStatus = ChargingStatus::NO_CHARGING
 Charging status enumeration.
 

Detailed Description

Charger status structure.

This is intentionally minimal; different PMICs expose richer status sets. Implementations can fill what they can and leave others at default.

Definition at line 187 of file PmicChargerBase.hpp.

Member Data Documentation

◆ batteryPresent

bool PmicChargerBase::Status::batteryPresent = false

Battery present and detected.

Definition at line 190 of file PmicChargerBase.hpp.

Referenced by loop().

◆ chargeDone

bool PmicChargerBase::Status::chargeDone = false

Charge termination/done (battery full)

Definition at line 192 of file PmicChargerBase.hpp.

Referenced by SY6970Charger::getStatus(), BQ25896Charger::getStatus(), and loop().

◆ charging

bool PmicChargerBase::Status::charging = false

Charging state (coarse: true if in precharge/fastcharge)

Definition at line 191 of file PmicChargerBase.hpp.

Referenced by SY6970Charger::getStatus(), BQ25896Charger::getStatus(), AXP1xxCharger< Regs >::isCharging(), AXP2101Charger::isCharging(), AXP517Charger::isCharging(), and loop().

◆ chargingStatus

ChargingStatus PmicChargerBase::Status::chargingStatus = ChargingStatus::NO_CHARGING

Charging status enumeration.

Definition at line 195 of file PmicChargerBase.hpp.

Referenced by SY6970Charger::getStatus(), and BQ25896Charger::getStatus().

◆ fault

bool PmicChargerBase::Status::fault = false

Any fault latched/active.

Definition at line 193 of file PmicChargerBase.hpp.

Referenced by SY6970Charger::getStatus(), BQ25896Charger::getStatus(), and loop().

◆ faultCode

uint32_t PmicChargerBase::Status::faultCode = 0

Optional raw fault code for diagnostics.

Definition at line 194 of file PmicChargerBase.hpp.

Referenced by SY6970Charger::getStatus(), BQ25896Charger::getStatus(), and loop().

◆ online

bool PmicChargerBase::Status::online = false

PMIC reachable / initialized.

Definition at line 188 of file PmicChargerBase.hpp.

Referenced by SY6970Charger::getStatus(), BQ25896Charger::getStatus(), AXP517Charger::getStatus(), and loop().

◆ vbusPresent

bool PmicChargerBase::Status::vbusPresent = false

VBUS detected / good (USB power present)

Definition at line 189 of file PmicChargerBase.hpp.

Referenced by SY6970Charger::getStatus(), BQ25896Charger::getStatus(), isVbusPresentNow(), loop(), and setup().


The documentation for this struct was generated from the following file: