SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
Loading...
Searching...
No Matches
GaugeBQ27220 Class Reference

#include <GaugeBQ27220.hpp>

Inheritance diagram for GaugeBQ27220:
[legend]

Public Types

enum  Access { FULL_ACCESS = 1 , UNBLOCK_ACCESS , SEALED_ACCESS }
 

Public Member Functions

 GaugeBQ27220 ()
 
 ~GaugeBQ27220 ()=default
 
bool begin (SensorCommCustom::CustomCallback callback, SensorCommCustomHal::CustomHalCallback hal_callback)
 
bool refresh () override
 Refresh the battery data by reading from the registers.
 
uint16_t getAtRate () const
 Get the AtRate value.
 
uint16_t getAtRateTimeToEmpty () const
 Get the AtRateTimeToEmpty value.
 
float getTemperature () override
 Get the temperature value.
 
uint16_t getVoltage () override
 Get the battery voltage value.
 
BatteryStatus getBatteryStatus () const
 Get the battery status.
 
float getCurrent () override
 Get the instantaneous current value.
 
bool isCharging () override
 Check if battery is charging.
 
bool isDischarging () override
 Check if battery is discharging.
 
uint16_t getRemainingCapacity () const
 Get the remaining battery capacity.
 
uint16_t getFullChargeCapacity () const
 Get the full charge capacity of the battery.
 
uint16_t getTimeToEmpty () override
 Get the estimated time until the battery is empty.
 
uint16_t getTimeToFull () override
 Get the estimated time until the battery is fully charged.
 
int16_t getStandbyCurrent () const
 Get the standby current value.
 
uint16_t getStandbyTimeToEmpty () const
 Get the estimated time until the battery is empty at standby discharge rate.
 
int16_t getMaxLoadCurrent () const
 Get the maximum load current value.
 
uint16_t getMaxLoadTimeToEmpty () const
 Get the estimated time until the battery is empty at maximum load current discharge rate.
 
uint16_t getRawCoulombCount () const
 Get the raw coulomb count value.
 
int16_t getAveragePower () const
 Get the average power value.
 
float getInternalTemperature () const
 Get the internal temperature value.
 
uint16_t getCycleCount () const
 Get the cycle count value.
 
uint16_t getStateOfCharge () override
 Get the state of charge value.
 
uint16_t getStateOfHealth () const
 Get the state of health value.
 
uint16_t getRequestChargingVoltage () const
 Get the requested charging voltage value.
 
uint16_t getRequestChargingCurrent () const
 Get the requested charging current value.
 
uint16_t getBTPDischargeSet () const
 Get the BTP discharge set value.
 
uint16_t getBTPChargeSet () const
 Get the BTP charge set value.
 
FuelGaugeOperationStatus getOperationStatus () const
 Get the operation status.
 
uint16_t getDesignCapacity () const
 Get the design capacity value.
 
bool setNewCapacity (uint16_t newDesignCapacity, uint16_t newFullChargeCapacity)
 Set the new design capacity and full charge capacity of the battery.
 
OperationConfig getOperationConfig ()
 Retrieve the operation configuration of the device.
 
uint16_t getChipID () override
 Retrieve the unique identifier of the chip.
 
int getHardwareVersion ()
 Get the hardware version of the device.
 
int getFirmwareVersion ()
 Get the firmware version of the device.
 
void reset () override
 Reset the device.
 
void setAccessKey (uint32_t key)
 Set the access key for the device.
 
- Public Member Functions inherited from GaugeBase
virtual ~GaugeBase ()=default
 
 GaugeBase (const GaugeBase &)=delete
 
GaugeBaseoperator= (const GaugeBase &)=delete
 
- Public Member Functions inherited from I2CDeviceWithHal
bool begin (SensorCommCustom::CustomCallback cb, SensorCommCustomHal::CustomHalCallback hal_cb, uint8_t addr)
 Initialize the sensor using custom callback interface.
 
- Public Member Functions inherited from DeviceBeginCommon
virtual ~DeviceBeginCommon ()
 
uint8_t getAddress () const
 
uint8_t getInterface () const
 
- Public Member Functions inherited from SensorCommWrapper
 SensorCommWrapper ()=default
 
int readReg (uint8_t reg) const
 
int readRegBuff (uint8_t reg, uint8_t *buf, size_t len) const
 
int readBuff (uint8_t *buf, size_t len) const
 
int writeReg (uint8_t reg, uint8_t val)
 
int writeRegBuff (uint8_t reg, uint8_t *buf, size_t len)
 
int writeBuff (uint8_t *buf, size_t len)
 
int writeThenRead (const uint8_t *write_buffer, size_t write_len, uint8_t *read_buffer, size_t read_len)
 
bool setRegBit (uint8_t reg, uint8_t bit)
 
bool clrRegBit (uint8_t reg, uint8_t bit)
 
bool getRegBit (uint8_t reg, uint8_t bit)
 
int updateBits (uint8_t reg, uint8_t mask, uint8_t value_shifted)
 
void setAddress (uint8_t address)
 
void setAck (bool enable)
 
- Public Member Functions inherited from SensorCommInterface
virtual ~SensorCommInterface ()=default
 

Protected Attributes

uint32_t accessKey
 
BatteryData data
 
const uint8_t START_REGISTER = 0x02
 
const uint8_t REGISTER_COUNT = 54
 
- Protected Attributes inherited from DeviceBeginCommon
std::unique_ptr< SensorCommBasecomm
 
std::unique_ptr< SensorHalhal
 
std::unique_ptr< SensorCommStaticstaticComm
 
uint8_t _addr = 0
 
uint8_t _iface = COMM_CUSTOM
 

Static Protected Attributes

static constexpr uint16_t BQ27220_SUB_CMD_CTRL_STATUS = (0x0000)
 
static constexpr uint16_t BQ27220_SUB_CMD_DEVICE_NUMBER = (0x0001)
 
static constexpr uint16_t BQ27220_SUB_CMD_FW_VERSION = (0x0002)
 
static constexpr uint16_t BQ27220_SUB_CMD_HW_VERSION = (0x0003)
 
static constexpr uint16_t BQ27220_SUB_CMD_BOARD_OFFSET = (0x0009)
 
static constexpr uint16_t BQ27220_SUB_CMD_CC_OFFSET = (0x000A)
 
static constexpr uint16_t BQ27220_SUB_CMD_CC_OFFSET_SAVE = (0x000B)
 
static constexpr uint16_t BQ27220_SUB_CMD_OCV_CMD = (0x000C)
 
static constexpr uint16_t BQ27220_SUB_CMD_BAT_INSERT = (0x000D)
 
static constexpr uint16_t BQ27220_SUB_CMD_BAT_REMOVE = (0x000E)
 
static constexpr uint16_t BQ27220_SUB_CMD_SET_SNOOZE = (0x0013)
 
static constexpr uint16_t BQ27220_SUB_CMD_CLEAR_SNOOZE = (0x0014)
 
static constexpr uint16_t BQ27220_SUB_CMD_SET_PROFILE_1 = (0x0015)
 
static constexpr uint16_t BQ27220_SUB_CMD_SET_PROFILE_2 = (0x0016)
 
static constexpr uint16_t BQ27220_SUB_CMD_SET_PROFILE_3 = (0x0017)
 
static constexpr uint16_t BQ27220_SUB_CMD_SET_PROFILE_4 = (0x0018)
 
static constexpr uint16_t BQ27220_SUB_CMD_SET_PROFILE_5 = (0x0019)
 
static constexpr uint16_t BQ27220_SUB_CMD_SET_PROFILE_6 = (0x001A)
 
static constexpr uint16_t BQ27220_SUB_CMD_CAL_TOGGLE = (0x002D)
 
static constexpr uint16_t BQ27220_SUB_CMD_SEALED = (0x0030)
 
static constexpr uint16_t BQ27220_SUB_CMD_RESET = (0x0041)
 
static constexpr uint16_t BQ27220_SUB_CMD_EXIT_CAL = (0x0080)
 
static constexpr uint16_t BQ27220_SUB_CMD_ENTER_CAL = (0x0081)
 
static constexpr uint16_t BQ27220_SUB_CMD_ENTER_CFG_UPDATE = (0x0090)
 
static constexpr uint16_t BQ27220_SUB_CMD_EXIT_CFG_UPDATE_REINIT = (0x0091)
 
static constexpr uint16_t BQ27220_SUB_CMD_EXIT_CFG_UPDATE = (0x0092)
 
static constexpr uint16_t BQ27220_SUB_CMD_RETURN_TO_ROM = (0x0F00)
 
static constexpr uint8_t BQ27220_REG_STA_AT_RATE = (0x02)
 
static constexpr uint8_t BQ27220_REG_STA_AT_RATE_TIME_TO_EMPTY = (0x04)
 
static constexpr uint8_t BQ27220_REG_STA_NTC_TEMP = (0x06)
 
static constexpr uint8_t BQ27220_REG_STA_BAT_VOLTAGE = (0x08)
 
static constexpr uint8_t BQ27220_REG_STA_BAT_STATUS = (0x0A)
 
static constexpr uint8_t BQ27220_REG_STA_CURRENT = (0x0C)
 
static constexpr uint8_t BQ27220_REG_STA_REMAINING_CAPACITY = (0x10)
 
static constexpr uint8_t BQ27220_REG_STA_FULL_CHARGE_CAPACITY = (0x12)
 
static constexpr uint8_t BQ27220_REG_STA_TIME_TO_EMPTY = (0x16)
 
static constexpr uint8_t BQ27220_REG_STA_TIME_TO_FULL = (0x18)
 
static constexpr uint8_t BQ27220_REG_STA_STANDBY_CURRENT = (0x1A)
 
static constexpr uint8_t BQ27220_REG_STA_STANDBY_TIME_TO_EMPTY = (0x1C)
 
static constexpr uint8_t BQ27220_REG_STA_MAX_LOAD_CURRENT = (0x1E)
 
static constexpr uint8_t BQ27220_REG_STA_MAX_LOAD_TO_EMPTY = (0x20)
 
static constexpr uint8_t BQ27220_REG_STA_COULOMB_COUNT = (0x22)
 
static constexpr uint8_t BQ27220_REG_STA_AVG_POWER = (0x24)
 
static constexpr uint8_t BQ27220_REG_STA_INTER_TEMP = (0x28)
 
static constexpr uint8_t BQ27220_REG_STA_CYCLE_COUNT = (0x2A)
 
static constexpr uint8_t BQ27220_REG_STA_STATE_OF_CHARGE = (0x2C)
 
static constexpr uint8_t BQ27220_REG_STA_STATE_OF_HEALTH = (0x2E)
 
static constexpr uint8_t BQ27220_REG_STA_CHARGING_VOLTAGE = (0x30)
 
static constexpr uint8_t BQ27220_REG_STA_CHARGING_CURRENT = (0x32)
 
static constexpr uint8_t BQ27220_REG_STA_BTP_DISC_SET = (0x34)
 
static constexpr uint8_t BQ27220_REG_STA_BTP_CHARGE_SET = (0x36)
 
static constexpr uint8_t BQ27220_REG_STA_OPERATION_STATUS = (0x3A)
 
static constexpr uint8_t BQ27220_REG_STA_DESIGN_CAPACITY = (0x3C)
 
static constexpr uint8_t BQ27220_REG_STA_DESIGN_CAPACITY_MSB = (0x3E)
 
static constexpr uint8_t BQ27220_REG_STA_DESIGN_CAPACITY_LSB = (0x3F)
 
static constexpr uint8_t BQ27220_REG_MAC_BUFFER_START = (0x40)
 
static constexpr uint8_t BQ27220_REG_MAC_BUFFER_END = (0x5F)
 
static constexpr uint8_t BQ27220_REG_MAC_DATA_SUM = (0x60)
 
static constexpr uint8_t BQ27220_REG_MAC_DATA_LEN = (0x61)
 
static constexpr uint8_t BQ27220_REG_ANALOG_COUNT = (0x79)
 
static constexpr uint8_t BQ27220_REG_RAW_CURRENT = (0x7A)
 
static constexpr uint8_t BQ27220_REG_RAW_VOLTAGE = (0x7C)
 
static constexpr uint8_t BQ27220_REG_ROM_START = (0x3E)
 
static constexpr uint16_t BQ27220_CHIP_ID = (0x0220)
 
static constexpr uint16_t BQ27220_ROM_FULL_CHARGE_CAPACITY = (0x929D)
 
static constexpr uint16_t BQ27220_ROM_DESIGN_CAPACITY = (0x929F)
 
static constexpr uint16_t BQ27220_ROM_OPERATION_CONFIG_A = (0x9206)
 
static constexpr uint16_t BQ27220_ROM_OPERATION_CONFIG_B = (0x9208)
 

Additional Inherited Members

- Protected Member Functions inherited from GaugeBase
 GaugeBase ()=default
 
- Protected Member Functions inherited from I2CDeviceWithHal
bool ensureValid () const override
 Ensure the communication interface is valid.
 
- Protected Member Functions inherited from DeviceBeginCommon
 DeviceBeginCommon ()=default
 
virtual SensorCommBasegetComm () const override
 
virtual void beforeBegin ()
 
virtual void afterCommReady ()
 
virtual void afterInitSuccess (uint8_t param)
 
virtual void onBeginFail ()
 
bool fail ()
 
void clearCommState ()
 
template<typename CreateComm >
bool beginLifecycle (uint8_t addr, uint8_t iface, uint8_t initParam, CreateComm createComm)
 

Detailed Description

Definition at line 591 of file gauge/ti/GaugeBQ27220.hpp.

Member Enumeration Documentation

◆ Access

Enumerator
FULL_ACCESS 
UNBLOCK_ACCESS 
SEALED_ACCESS 

Definition at line 635 of file gauge/ti/GaugeBQ27220.hpp.

Constructor & Destructor Documentation

◆ GaugeBQ27220()

GaugeBQ27220::GaugeBQ27220 ( )
inline

Definition at line 641 of file gauge/ti/GaugeBQ27220.hpp.

◆ ~GaugeBQ27220()

GaugeBQ27220::~GaugeBQ27220 ( )
default

Member Function Documentation

◆ begin()

bool GaugeBQ27220::begin ( SensorCommCustom::CustomCallback  callback,
SensorCommCustomHal::CustomHalCallback  hal_callback 
)
inline

Definition at line 666 of file gauge/ti/GaugeBQ27220.hpp.

References I2CDeviceWithHal::begin(), and hal_callback().

Referenced by setup().

◆ getAtRate()

uint16_t GaugeBQ27220::getAtRate ( ) const
inline

Get the AtRate value.

The AtRate represents the current rate at which the battery is being discharged or charged. The value is in milliamperes (mA).

Returns
The AtRate value in mA.

Definition at line 707 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getAtRateTimeToEmpty()

uint16_t GaugeBQ27220::getAtRateTimeToEmpty ( ) const
inline

Get the AtRateTimeToEmpty value.

The AtRateTimeToEmpty indicates the estimated time remaining until the battery is empty at the current discharge rate. The unit is minutes.

Returns
The AtRateTimeToEmpty value in minutes.

Definition at line 715 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getAveragePower()

int16_t GaugeBQ27220::getAveragePower ( ) const
inline

Get the average power value.

The average power during battery charging and discharging. Values are negative during discharging and positive during charging. A value of 0 means the battery is not discharging. The value is reported in milliwatts (mW).

Returns
The average power value in mW.

Definition at line 833 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getBatteryStatus()

BatteryStatus GaugeBQ27220::getBatteryStatus ( ) const
inline

Get the battery status.

The Read Word function returns the contents of the Fuel Gauge Status Register, describing the current battery status.

Returns
The battery status.

Definition at line 739 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getBTPChargeSet()

uint16_t GaugeBQ27220::getBTPChargeSet ( ) const
inline

Get the BTP charge set value.

This read/write word command updates the BTP setup threshold that triggers the BTP interrupt in the charge direction and sets the OperationStatus()[BTPINT] bit.

Returns
The BTP charge set value.

Definition at line 899 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getBTPDischargeSet()

uint16_t GaugeBQ27220::getBTPDischargeSet ( ) const
inline

Get the BTP discharge set value.

This read/write word command updates the BTP setup threshold that triggers the BTP interrupt in the discharge direction and sets the OperationStatus()[BTPINT] bit.

Returns
The BTP discharge set value.

Definition at line 891 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getChipID()

uint16_t GaugeBQ27220::getChipID ( )
inlineoverridevirtual

Retrieve the unique identifier of the chip.

Returns
A 16 - bit unsigned integer representing the chip's unique identifier.

Implements GaugeBase.

Definition at line 984 of file gauge/ti/GaugeBQ27220.hpp.

References arraySize(), and BQ27220_SUB_CMD_DEVICE_NUMBER.

◆ getCurrent()

float GaugeBQ27220::getCurrent ( )
inlineoverridevirtual

Get the instantaneous current value.

The instantaneous current in the sense resistor. It is updated once per second. A negative value indicates a discharge current. The unit is milliamperes (mA).

Returns
The instantaneous current value in mA.

Implements GaugeBase.

Definition at line 747 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getCycleCount()

uint16_t GaugeBQ27220::getCycleCount ( ) const
inline

Get the cycle count value.

The number of cycles the active battery has experienced, ranging from 0 to 65535. A cycle occurs when the accumulated discharge ≥ the cycle threshold.

Returns
The cycle count value.

Definition at line 849 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getDesignCapacity()

uint16_t GaugeBQ27220::getDesignCapacity ( ) const
inline

Get the design capacity value.

This read - only function returns the value stored in the design capacity in milliampere - hours (mAh). This value is used as the theoretical or nominal capacity of a new battery pack and is used to calculate the state of health.

Returns
The design capacity value in mAh.

Definition at line 916 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getFirmwareVersion()

int GaugeBQ27220::getFirmwareVersion ( )
inline

Get the firmware version of the device.

This function tries to obtain the firmware version by sending a specific sub - command to request the firmware version. If the sub - command sending fails or the subsequent reading of the MAC data fails, it returns -1. Otherwise, it combines the four bytes read from the MAC data into a 32 - bit unsigned integer and returns it as the firmware version.

Returns
The firmware version as a 32 - bit unsigned integer if successful, -1 otherwise.

Definition at line 1025 of file gauge/ti/GaugeBQ27220.hpp.

References arraySize(), and BQ27220_SUB_CMD_FW_VERSION.

◆ getFullChargeCapacity()

uint16_t GaugeBQ27220::getFullChargeCapacity ( ) const
inline

Get the full charge capacity of the battery.

This function returns the full charge capacity of the battery in milliampere - hours (mAh).

Returns
The full charge capacity of the battery in mAh.

Definition at line 773 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getHardwareVersion()

int GaugeBQ27220::getHardwareVersion ( )
inline

Get the hardware version of the device.

This function attempts to retrieve the hardware version by writing a specific value to the hardware version sub - command register and then reading the MAC data. If any step fails during the process, it returns -1 to indicate an error. Otherwise, it combines the two bytes read from the MAC data into a 16 - bit unsigned integer and returns it as the hardware version.

Returns
The hardware version as a 16 - bit unsigned integer if successful, -1 otherwise.

Definition at line 1005 of file gauge/ti/GaugeBQ27220.hpp.

References arraySize(), BQ27220_SUB_CMD_HW_VERSION, and SensorCommWrapper::writeReg().

◆ getInternalTemperature()

float GaugeBQ27220::getInternalTemperature ( ) const
inline

Get the internal temperature value.

This read - only function returns the internal temperature sensor value measured by the fuel gauge in Celsius. The raw data is stored in tenths of Kelvin and is converted to Celsius in this function.

Returns
The internal temperature value in Celsius.

Definition at line 841 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getMaxLoadCurrent()

int16_t GaugeBQ27220::getMaxLoadCurrent ( ) const
inline

Get the maximum load current value.

This function returns the signed integer value in milliamperes (mA) at the maximum load.

Returns
The maximum load current value in mA.

Definition at line 810 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getMaxLoadTimeToEmpty()

uint16_t GaugeBQ27220::getMaxLoadTimeToEmpty ( ) const
inline

Get the estimated time until the battery is empty at maximum load current discharge rate.

This function returns the predicted remaining battery life in minutes at the maximum load current discharge rate.

Returns
The estimated time to empty at maximum load current discharge rate in minutes.

Definition at line 817 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getOperationConfig()

OperationConfig GaugeBQ27220::getOperationConfig ( )
inline

Retrieve the operation configuration of the device.

This function is responsible for obtaining the current operation configuration of the device. The operation configuration typically includes various settings and parameters that govern the device's behavior, such as operating modes, thresholds, and enable/disable flags.

Returns
An OperationConfig object that contains the current operation configuration of the device.

Definition at line 964 of file gauge/ti/GaugeBQ27220.hpp.

References sensorlib::_highByte(), sensorlib::_lowByte(), BQ27220_REG_ROM_START, BQ27220_ROM_OPERATION_CONFIG_A, DeviceBeginCommon::hal, SensorCommWrapper::readRegBuff(), and SensorCommWrapper::writeReg().

Referenced by setup().

◆ getOperationStatus()

FuelGaugeOperationStatus GaugeBQ27220::getOperationStatus ( ) const
inline

Get the operation status.

The Read Word function returns the contents of the internal status register. See datasheet page 27.

Returns
The operation status.

Definition at line 907 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getRawCoulombCount()

uint16_t GaugeBQ27220::getRawCoulombCount ( ) const
inline

Get the raw coulomb count value.

The amount of coulombs transferred from a battery during charge/discharge.

Returns
The raw coulomb count value.

Definition at line 824 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getRemainingCapacity()

uint16_t GaugeBQ27220::getRemainingCapacity ( ) const
inline

Get the remaining battery capacity.

This function returns the remaining capacity of the battery in milliampere - hours (mAh).

Returns
The remaining battery capacity in mAh.

Definition at line 766 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getRequestChargingCurrent()

uint16_t GaugeBQ27220::getRequestChargingCurrent ( ) const
inline

Get the requested charging current value.

This read - only function returns an unsigned integer value for the desired battery charging current. A value of 65,535 indicates that the battery is requesting the maximum current from the battery charger.

Returns
The requested charging current value in mA.

Definition at line 883 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getRequestChargingVoltage()

uint16_t GaugeBQ27220::getRequestChargingVoltage ( ) const
inline

Get the requested charging voltage value.

This read - only function returns the unsigned integer value of the desired battery charging voltage. A value of 65,535 indicates that the battery is requesting the maximum voltage from the battery charger.

Returns
The requested charging voltage value in mV.

Definition at line 874 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getStandbyCurrent()

int16_t GaugeBQ27220::getStandbyCurrent ( ) const
inline

Get the standby current value.

The standby current measured by the sense resistor. The unit is milliamperes (mA).

Returns
The standby current value in mA.

Definition at line 796 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getStandbyTimeToEmpty()

uint16_t GaugeBQ27220::getStandbyTimeToEmpty ( ) const
inline

Get the estimated time until the battery is empty at standby discharge rate.

This function returns the predicted remaining battery life in minutes at the standby discharge rate.

Returns
The estimated time to empty at standby discharge rate in minutes.

Definition at line 803 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getStateOfCharge()

uint16_t GaugeBQ27220::getStateOfCharge ( )
inlineoverridevirtual

Get the state of charge value.

This read - only function returns an unsigned integer value representing the predicted remaining battery capacity as a percentage of the full charge capacity, in the range 0 to 100%.

Returns
The state of charge value in percentage.

Implements GaugeBase.

Definition at line 857 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getStateOfHealth()

uint16_t GaugeBQ27220::getStateOfHealth ( ) const
inline

Get the state of health value.

This read - only function returns an unsigned integer value representing the percentage of the full charge capacity to the design capacity, ranging from 0 to 100%.

Returns
The state of health value in percentage.

Definition at line 865 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getTemperature()

float GaugeBQ27220::getTemperature ( )
inlineoverridevirtual

Get the temperature value.

This function returns the temperature measured by the fuel gauge in Celsius. The raw data is stored in tenths of Kelvin and is converted to Celsius in this function.

Returns
The temperature value in Celsius.

Implements GaugeBase.

Definition at line 723 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getTimeToEmpty()

uint16_t GaugeBQ27220::getTimeToEmpty ( )
inlineoverridevirtual

Get the estimated time until the battery is empty.

This function returns the estimated time remaining until the battery is empty under normal operating conditions. The unit is minutes.

Returns
The estimated time to empty in minutes.

Implements GaugeBase.

Definition at line 781 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getTimeToFull()

uint16_t GaugeBQ27220::getTimeToFull ( )
inlineoverridevirtual

Get the estimated time until the battery is fully charged.

This function returns the estimated time remaining until the battery is fully charged. The unit is minutes.

Returns
The estimated time to full in minutes.

Implements GaugeBase.

Definition at line 789 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ getVoltage()

uint16_t GaugeBQ27220::getVoltage ( )
inlineoverridevirtual

Get the battery voltage value.

This value represents the measured battery pack voltage in millivolts (mV), ranging from 0 to 6000mV.

Returns
The battery voltage value in mV.

Implements GaugeBase.

Definition at line 731 of file gauge/ti/GaugeBQ27220.hpp.

References data.

Referenced by loop().

◆ isCharging()

bool GaugeBQ27220::isCharging ( )
inlineoverridevirtual

Check if battery is charging.

Returns
true if charging, false otherwise

Implements GaugeBase.

Definition at line 753 of file gauge/ti/GaugeBQ27220.hpp.

References data.

◆ isDischarging()

bool GaugeBQ27220::isDischarging ( )
inlineoverridevirtual

Check if battery is discharging.

Returns
true if discharging, false otherwise

Implements GaugeBase.

Definition at line 759 of file gauge/ti/GaugeBQ27220.hpp.

References data.

◆ refresh()

bool GaugeBQ27220::refresh ( )
inlineoverridevirtual

Refresh the battery data by reading from the registers.

This function attempts to read battery data from the specified registers of the fuel gauge. If any of the read operations fail, the function returns false; otherwise, it returns true.

Returns
true if all read operations are successful and the data is refreshed, false otherwise.

Implements GaugeBase.

Definition at line 679 of file gauge/ti/GaugeBQ27220.hpp.

References data, i, SensorCommWrapper::readRegBuff(), REGISTER_COUNT, and START_REGISTER.

Referenced by loop().

◆ reset()

void GaugeBQ27220::reset ( )
inlineoverridevirtual

Reset the device.

This function sends a reset sub - command to the device to perform a reset operation.

Implements GaugeBase.

Definition at line 1041 of file gauge/ti/GaugeBQ27220.hpp.

References BQ27220_SUB_CMD_RESET.

◆ setAccessKey()

void GaugeBQ27220::setAccessKey ( uint32_t  key)
inline

Set the access key for the device.

If this function is not called, the default access key is 0xFFFFFFFF. This function allows the user to set a custom access key.

Parameters
keyThe 32 - bit unsigned integer representing the access key to be set.

Definition at line 1052 of file gauge/ti/GaugeBQ27220.hpp.

References accessKey.

◆ setNewCapacity()

bool GaugeBQ27220::setNewCapacity ( uint16_t  newDesignCapacity,
uint16_t  newFullChargeCapacity 
)
inline

Set the new design capacity and full charge capacity of the battery.

This function is responsible for updating the design capacity and full charge capacity of the battery. It first checks the device's access settings, enters the configuration update mode, writes the new capacity values and checksums, and finally exits the configuration update mode. If the device was previously in a sealed state, it will be restored to the sealed mode after the operation is completed. For new devices, use the default key for access. If it is an encrypted device, use setAccessKey(uint32_t key) to set the key.

Parameters
newDesignCapacityThe new design capacity to be set, of type uint16_t.
newFullChargeCapacityThe new full charge capacity to be set, of type uint16_t.
Returns
bool Returns true if the setting is successful, false otherwise.

Definition at line 932 of file gauge/ti/GaugeBQ27220.hpp.

References sensorlib::_highByte(), sensorlib::_lowByte(), BQ27220_ROM_DESIGN_CAPACITY, BQ27220_ROM_FULL_CHARGE_CAPACITY, DeviceBeginCommon::hal, and SENSORLIB_LOG_E.

Referenced by setup().

Member Data Documentation

◆ accessKey

uint32_t GaugeBQ27220::accessKey
protected

Definition at line 1309 of file gauge/ti/GaugeBQ27220.hpp.

Referenced by setAccessKey().

◆ BQ27220_CHIP_ID

constexpr uint16_t GaugeBQ27220::BQ27220_CHIP_ID = (0x0220)
staticconstexprprotected

Definition at line 1381 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_ANALOG_COUNT

constexpr uint8_t GaugeBQ27220::BQ27220_REG_ANALOG_COUNT = (0x79)
staticconstexprprotected

Definition at line 1376 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_MAC_BUFFER_END

constexpr uint8_t GaugeBQ27220::BQ27220_REG_MAC_BUFFER_END = (0x5F)
staticconstexprprotected

Definition at line 1373 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_MAC_BUFFER_START

constexpr uint8_t GaugeBQ27220::BQ27220_REG_MAC_BUFFER_START = (0x40)
staticconstexprprotected

Definition at line 1372 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_MAC_DATA_LEN

constexpr uint8_t GaugeBQ27220::BQ27220_REG_MAC_DATA_LEN = (0x61)
staticconstexprprotected

Definition at line 1375 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_MAC_DATA_SUM

constexpr uint8_t GaugeBQ27220::BQ27220_REG_MAC_DATA_SUM = (0x60)
staticconstexprprotected

Definition at line 1374 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_RAW_CURRENT

constexpr uint8_t GaugeBQ27220::BQ27220_REG_RAW_CURRENT = (0x7A)
staticconstexprprotected

Definition at line 1377 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_RAW_VOLTAGE

constexpr uint8_t GaugeBQ27220::BQ27220_REG_RAW_VOLTAGE = (0x7C)
staticconstexprprotected

Definition at line 1378 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_ROM_START

constexpr uint8_t GaugeBQ27220::BQ27220_REG_ROM_START = (0x3E)
staticconstexprprotected

Definition at line 1379 of file gauge/ti/GaugeBQ27220.hpp.

Referenced by getOperationConfig().

◆ BQ27220_REG_STA_AT_RATE

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_AT_RATE = (0x02)
staticconstexprprotected

Definition at line 1344 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_AT_RATE_TIME_TO_EMPTY

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_AT_RATE_TIME_TO_EMPTY = (0x04)
staticconstexprprotected

Definition at line 1345 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_AVG_POWER

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_AVG_POWER = (0x24)
staticconstexprprotected

Definition at line 1359 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_BAT_STATUS

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_BAT_STATUS = (0x0A)
staticconstexprprotected

Definition at line 1348 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_BAT_VOLTAGE

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_BAT_VOLTAGE = (0x08)
staticconstexprprotected

Definition at line 1347 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_BTP_CHARGE_SET

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_BTP_CHARGE_SET = (0x36)
staticconstexprprotected

Definition at line 1367 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_BTP_DISC_SET

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_BTP_DISC_SET = (0x34)
staticconstexprprotected

Definition at line 1366 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_CHARGING_CURRENT

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_CHARGING_CURRENT = (0x32)
staticconstexprprotected

Definition at line 1365 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_CHARGING_VOLTAGE

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_CHARGING_VOLTAGE = (0x30)
staticconstexprprotected

Definition at line 1364 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_COULOMB_COUNT

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_COULOMB_COUNT = (0x22)
staticconstexprprotected

Definition at line 1358 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_CURRENT

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_CURRENT = (0x0C)
staticconstexprprotected

Definition at line 1349 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_CYCLE_COUNT

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_CYCLE_COUNT = (0x2A)
staticconstexprprotected

Definition at line 1361 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_DESIGN_CAPACITY

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_DESIGN_CAPACITY = (0x3C)
staticconstexprprotected

Definition at line 1369 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_DESIGN_CAPACITY_LSB

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_DESIGN_CAPACITY_LSB = (0x3F)
staticconstexprprotected

Definition at line 1371 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_DESIGN_CAPACITY_MSB

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_DESIGN_CAPACITY_MSB = (0x3E)
staticconstexprprotected

Definition at line 1370 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_FULL_CHARGE_CAPACITY

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_FULL_CHARGE_CAPACITY = (0x12)
staticconstexprprotected

Definition at line 1351 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_INTER_TEMP

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_INTER_TEMP = (0x28)
staticconstexprprotected

Definition at line 1360 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_MAX_LOAD_CURRENT

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_MAX_LOAD_CURRENT = (0x1E)
staticconstexprprotected

Definition at line 1356 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_MAX_LOAD_TO_EMPTY

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_MAX_LOAD_TO_EMPTY = (0x20)
staticconstexprprotected

Definition at line 1357 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_NTC_TEMP

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_NTC_TEMP = (0x06)
staticconstexprprotected

Definition at line 1346 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_OPERATION_STATUS

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_OPERATION_STATUS = (0x3A)
staticconstexprprotected

Definition at line 1368 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_REMAINING_CAPACITY

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_REMAINING_CAPACITY = (0x10)
staticconstexprprotected

Definition at line 1350 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_STANDBY_CURRENT

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_STANDBY_CURRENT = (0x1A)
staticconstexprprotected

Definition at line 1354 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_STANDBY_TIME_TO_EMPTY

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_STANDBY_TIME_TO_EMPTY = (0x1C)
staticconstexprprotected

Definition at line 1355 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_STATE_OF_CHARGE

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_STATE_OF_CHARGE = (0x2C)
staticconstexprprotected

Definition at line 1362 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_STATE_OF_HEALTH

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_STATE_OF_HEALTH = (0x2E)
staticconstexprprotected

Definition at line 1363 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_TIME_TO_EMPTY

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_TIME_TO_EMPTY = (0x16)
staticconstexprprotected

Definition at line 1352 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_REG_STA_TIME_TO_FULL

constexpr uint8_t GaugeBQ27220::BQ27220_REG_STA_TIME_TO_FULL = (0x18)
staticconstexprprotected

Definition at line 1353 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_ROM_DESIGN_CAPACITY

constexpr uint16_t GaugeBQ27220::BQ27220_ROM_DESIGN_CAPACITY = (0x929F)
staticconstexprprotected

Definition at line 1384 of file gauge/ti/GaugeBQ27220.hpp.

Referenced by setNewCapacity().

◆ BQ27220_ROM_FULL_CHARGE_CAPACITY

constexpr uint16_t GaugeBQ27220::BQ27220_ROM_FULL_CHARGE_CAPACITY = (0x929D)
staticconstexprprotected

Definition at line 1383 of file gauge/ti/GaugeBQ27220.hpp.

Referenced by setNewCapacity().

◆ BQ27220_ROM_OPERATION_CONFIG_A

constexpr uint16_t GaugeBQ27220::BQ27220_ROM_OPERATION_CONFIG_A = (0x9206)
staticconstexprprotected

Definition at line 1385 of file gauge/ti/GaugeBQ27220.hpp.

Referenced by getOperationConfig().

◆ BQ27220_ROM_OPERATION_CONFIG_B

constexpr uint16_t GaugeBQ27220::BQ27220_ROM_OPERATION_CONFIG_B = (0x9208)
staticconstexprprotected

Definition at line 1386 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_BAT_INSERT

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_BAT_INSERT = (0x000D)
staticconstexprprotected

Definition at line 1323 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_BAT_REMOVE

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_BAT_REMOVE = (0x000E)
staticconstexprprotected

Definition at line 1324 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_BOARD_OFFSET

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_BOARD_OFFSET = (0x0009)
staticconstexprprotected

Definition at line 1319 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_CAL_TOGGLE

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_CAL_TOGGLE = (0x002D)
staticconstexprprotected

Definition at line 1333 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_CC_OFFSET

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_CC_OFFSET = (0x000A)
staticconstexprprotected

Definition at line 1320 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_CC_OFFSET_SAVE

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_CC_OFFSET_SAVE = (0x000B)
staticconstexprprotected

Definition at line 1321 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_CLEAR_SNOOZE

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_CLEAR_SNOOZE = (0x0014)
staticconstexprprotected

Definition at line 1326 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_CTRL_STATUS

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_CTRL_STATUS = (0x0000)
staticconstexprprotected

Definition at line 1315 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_DEVICE_NUMBER

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_DEVICE_NUMBER = (0x0001)
staticconstexprprotected

Definition at line 1316 of file gauge/ti/GaugeBQ27220.hpp.

Referenced by getChipID().

◆ BQ27220_SUB_CMD_ENTER_CAL

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_ENTER_CAL = (0x0081)
staticconstexprprotected

Definition at line 1337 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_ENTER_CFG_UPDATE

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_ENTER_CFG_UPDATE = (0x0090)
staticconstexprprotected

Definition at line 1338 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_EXIT_CAL

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_EXIT_CAL = (0x0080)
staticconstexprprotected

Definition at line 1336 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_EXIT_CFG_UPDATE

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_EXIT_CFG_UPDATE = (0x0092)
staticconstexprprotected

Definition at line 1340 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_EXIT_CFG_UPDATE_REINIT

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_EXIT_CFG_UPDATE_REINIT = (0x0091)
staticconstexprprotected

Definition at line 1339 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_FW_VERSION

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_FW_VERSION = (0x0002)
staticconstexprprotected

Definition at line 1317 of file gauge/ti/GaugeBQ27220.hpp.

Referenced by getFirmwareVersion().

◆ BQ27220_SUB_CMD_HW_VERSION

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_HW_VERSION = (0x0003)
staticconstexprprotected

Definition at line 1318 of file gauge/ti/GaugeBQ27220.hpp.

Referenced by getHardwareVersion().

◆ BQ27220_SUB_CMD_OCV_CMD

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_OCV_CMD = (0x000C)
staticconstexprprotected

Definition at line 1322 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_RESET

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_RESET = (0x0041)
staticconstexprprotected

Definition at line 1335 of file gauge/ti/GaugeBQ27220.hpp.

Referenced by reset().

◆ BQ27220_SUB_CMD_RETURN_TO_ROM

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_RETURN_TO_ROM = (0x0F00)
staticconstexprprotected

Definition at line 1341 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_SEALED

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_SEALED = (0x0030)
staticconstexprprotected

Definition at line 1334 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_SET_PROFILE_1

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_SET_PROFILE_1 = (0x0015)
staticconstexprprotected

Definition at line 1327 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_SET_PROFILE_2

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_SET_PROFILE_2 = (0x0016)
staticconstexprprotected

Definition at line 1328 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_SET_PROFILE_3

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_SET_PROFILE_3 = (0x0017)
staticconstexprprotected

Definition at line 1329 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_SET_PROFILE_4

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_SET_PROFILE_4 = (0x0018)
staticconstexprprotected

Definition at line 1330 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_SET_PROFILE_5

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_SET_PROFILE_5 = (0x0019)
staticconstexprprotected

Definition at line 1331 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_SET_PROFILE_6

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_SET_PROFILE_6 = (0x001A)
staticconstexprprotected

Definition at line 1332 of file gauge/ti/GaugeBQ27220.hpp.

◆ BQ27220_SUB_CMD_SET_SNOOZE

constexpr uint16_t GaugeBQ27220::BQ27220_SUB_CMD_SET_SNOOZE = (0x0013)
staticconstexprprotected

Definition at line 1325 of file gauge/ti/GaugeBQ27220.hpp.

◆ data

◆ REGISTER_COUNT

const uint8_t GaugeBQ27220::REGISTER_COUNT = 54
protected

Definition at line 1312 of file gauge/ti/GaugeBQ27220.hpp.

Referenced by refresh().

◆ START_REGISTER

const uint8_t GaugeBQ27220::START_REGISTER = 0x02
protected

Definition at line 1311 of file gauge/ti/GaugeBQ27220.hpp.

Referenced by refresh().


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