|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
#include <GaugeBQ27220.hpp>
Public Member Functions | |
| BatteryStatus (uint16_t bitmaps) | |
| Constructor for BatteryStatus class. | |
| bool | isFullDischargeDetected () const |
| Check if full discharge is detected. | |
| bool | isOcvMeasurementUpdateComplete () const |
| Check if the OCV measurement update is complete. | |
| bool | isOcvReadFailedDueToCurrent () const |
| Check if the OCV read failed due to current. | |
| bool | isInSleepMode () const |
| Check if the device is in sleep mode. | |
| bool | isOverTemperatureDuringCharging () const |
| Check if over-temperature is detected during charging. | |
| bool | isOverTemperatureDuringDischarge () const |
| Check if over-temperature is detected during discharge. | |
| bool | isFullChargeDetected () const |
| Check if full charge is detected. | |
| bool | isChargeInhibited () const |
| Check if charging is inhibited. | |
| bool | isChargingTerminationAlarm () const |
| Check if the charging termination alarm is triggered. | |
| bool | isGoodOcvMeasurement () const |
| Check if a good OCV measurement was made. | |
| bool | isBatteryInserted () const |
| Check if a battery is inserted. | |
| bool | isBatteryPresent () const |
| Check if a battery is present. | |
| bool | isDischargeTerminationAlarm () const |
| Check if the discharge termination alarm is triggered. | |
| bool | isSystemShutdownRequired () const |
| Check if system shutdown is required. | |
| bool | isInDischargeMode () const |
| Check if the device is in discharge mode. | |
Protected Attributes | ||
| struct { | ||
| bool fullDischargeDetected | ||
| bool ocvMeasurementUpdateComplete | ||
| bool ocvReadFailedDueToCurrent | ||
| bool inSleepMode | ||
| bool overTemperatureDuringCharging | ||
| bool overTemperatureDuringDischarge | ||
| bool fullChargeDetected | ||
| bool chargeInhibited | ||
| bool chargingTerminationAlarm | ||
| bool goodOcvMeasurement | ||
| bool batteryInserted | ||
| bool batteryPresent | ||
| bool dischargeTerminationAlarm | ||
| bool systemShutdownRequired | ||
| bool inDischargeMode | ||
| } | status | |
Definition at line 112 of file gauge/ti/GaugeBQ27220.hpp.
|
inline |
Constructor for BatteryStatus class.
Initializes the battery status fields based on the given 16-bit bitmaps.
| bitmaps | A 16-bit unsigned integer representing the battery status bitmaps. |
Definition at line 158 of file gauge/ti/GaugeBQ27220.hpp.
References sensorlib::_bv(), and status.
|
inline |
Check if a battery is inserted.
Definition at line 272 of file gauge/ti/GaugeBQ27220.hpp.
References status.
Referenced by loop().
|
inline |
Check if a battery is present.
Definition at line 280 of file gauge/ti/GaugeBQ27220.hpp.
References status.
Referenced by loop().
|
inline |
Check if charging is inhibited.
If set, indicates that charging should not begin because the Temperature() is outside the range [Charge Inhibit Temp Low, Charge Inhibit Temp High].
Definition at line 247 of file gauge/ti/GaugeBQ27220.hpp.
References status.
Referenced by loop().
|
inline |
Check if the charging termination alarm is triggered.
This flag is set and cleared based on the selected SOC Flag Config A option.
Definition at line 256 of file gauge/ti/GaugeBQ27220.hpp.
References status.
Referenced by loop().
|
inline |
Check if the discharge termination alarm is triggered.
This flag is set and cleared according to the selected SOC Flag Config A option.
Definition at line 289 of file gauge/ti/GaugeBQ27220.hpp.
References status.
Referenced by loop().
|
inline |
Check if full charge is detected.
This flag is set and cleared based on the SOC Flag Config A and SOC Flag Config B options selected.
Definition at line 238 of file gauge/ti/GaugeBQ27220.hpp.
References status.
Referenced by loop().
|
inline |
Check if full discharge is detected.
This flag is set and cleared based on the SOC Flag Config B option selected.
Definition at line 185 of file gauge/ti/GaugeBQ27220.hpp.
References status.
Referenced by loop().
|
inline |
Check if a good OCV measurement was made.
Definition at line 264 of file gauge/ti/GaugeBQ27220.hpp.
References status.
Referenced by loop().
|
inline |
Check if the device is in discharge mode.
When set, the device is in DISCHARGE mode; when cleared, the device is in CHARGING or RELAXATION mode.
Definition at line 307 of file gauge/ti/GaugeBQ27220.hpp.
References status.
Referenced by loop().
|
inline |
Check if the device is in sleep mode.
This bit will be temporarily cleared during AD measurements in SLEEP mode.
Definition at line 211 of file gauge/ti/GaugeBQ27220.hpp.
References status.
Referenced by loop().
|
inline |
Check if the OCV measurement update is complete.
Definition at line 193 of file gauge/ti/GaugeBQ27220.hpp.
References status.
Referenced by loop().
|
inline |
Check if the OCV read failed due to current.
This bit can only be set if a battery is present after receiving an OCV_CMD().
Definition at line 202 of file gauge/ti/GaugeBQ27220.hpp.
References status.
Referenced by loop().
|
inline |
Check if over-temperature is detected during charging.
If Operation Config B [INT_OT] bit = 1, the SOC_INT pin toggles once when the [OTC] bit is set.
Definition at line 220 of file gauge/ti/GaugeBQ27220.hpp.
References status.
Referenced by loop().
|
inline |
Check if over-temperature is detected during discharge.
If Operation Config B [INT_OT] bit = 1, the SOC_INT pin toggles once when the [OTD] bit is set.
Definition at line 229 of file gauge/ti/GaugeBQ27220.hpp.
References status.
Referenced by loop().
|
inline |
Check if system shutdown is required.
If set, the SOC_INT pin toggles once.
Definition at line 298 of file gauge/ti/GaugeBQ27220.hpp.
References status.
Referenced by loop().
| bool BatteryStatus::batteryInserted |
Definition at line 142 of file gauge/ti/GaugeBQ27220.hpp.
| bool BatteryStatus::batteryPresent |
Definition at line 144 of file gauge/ti/GaugeBQ27220.hpp.
| bool BatteryStatus::chargeInhibited |
Definition at line 136 of file gauge/ti/GaugeBQ27220.hpp.
| bool BatteryStatus::chargingTerminationAlarm |
Definition at line 138 of file gauge/ti/GaugeBQ27220.hpp.
| bool BatteryStatus::dischargeTerminationAlarm |
Definition at line 146 of file gauge/ti/GaugeBQ27220.hpp.
| bool BatteryStatus::fullChargeDetected |
Definition at line 133 of file gauge/ti/GaugeBQ27220.hpp.
| bool BatteryStatus::fullDischargeDetected |
Definition at line 117 of file gauge/ti/GaugeBQ27220.hpp.
| bool BatteryStatus::goodOcvMeasurement |
Definition at line 140 of file gauge/ti/GaugeBQ27220.hpp.
| bool BatteryStatus::inDischargeMode |
Definition at line 150 of file gauge/ti/GaugeBQ27220.hpp.
| bool BatteryStatus::inSleepMode |
Definition at line 125 of file gauge/ti/GaugeBQ27220.hpp.
| bool BatteryStatus::ocvMeasurementUpdateComplete |
Definition at line 119 of file gauge/ti/GaugeBQ27220.hpp.
| bool BatteryStatus::ocvReadFailedDueToCurrent |
Definition at line 122 of file gauge/ti/GaugeBQ27220.hpp.
| bool BatteryStatus::overTemperatureDuringCharging |
Definition at line 128 of file gauge/ti/GaugeBQ27220.hpp.
| bool BatteryStatus::overTemperatureDuringDischarge |
Definition at line 131 of file gauge/ti/GaugeBQ27220.hpp.
| struct { ... } BatteryStatus::status |
Referenced by BatteryStatus(), isBatteryInserted(), isBatteryPresent(), isChargeInhibited(), isChargingTerminationAlarm(), isDischargeTerminationAlarm(), isFullChargeDetected(), isFullDischargeDetected(), isGoodOcvMeasurement(), isInDischargeMode(), isInSleepMode(), isOcvMeasurementUpdateComplete(), isOcvReadFailedDueToCurrent(), isOverTemperatureDuringCharging(), isOverTemperatureDuringDischarge(), and isSystemShutdownRequired().
| bool BatteryStatus::systemShutdownRequired |
Definition at line 148 of file gauge/ti/GaugeBQ27220.hpp.