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

#include <GaugeBQ27220.hpp>

Public Member Functions

 OperationConfig (uint32_t registerValue)
 Constructor for OperationConfig class.
 
uint16_t getConfigA () const
 Get the value in configuration register A.
 
uint16_t getConfigB () const
 Get the value in configuration register B.
 
bool isTempsSet () const
 Check if the external thermistor is selected for temperature measurement.
 
bool isBatgPolHigh () const
 Check the BATT_GD pin polarity.
 
bool isBatgEnEnabled () const
 Check if the BATT_GD function is enabled.
 
bool canEnterSleep () const
 Check if the fuel gauge can enter the SLEEP state.
 
bool isSlpwakechgEnabled () const
 Check if the slpwakechg function is enabled.
 
bool isWrtempEnabled () const
 Check if the write temperature function is enabled.
 
bool isBienableEnabled () const
 Check if battery insertion detection is enabled.
 
bool isBlPupEnEnabled () const
 Check if the battery insertion pin pull - up is enabled.
 
int getPfcCfg () const
 Get the Pin Function Code (PFC) mode.
 
bool isWakeEnEnabled () const
 Check if the wake - up function is enabled.
 
int getWkTh1 () const
 Get the Wake - up threshold 1 value.
 
int getWkTh0 () const
 Get the Wake - up threshold 0 value.
 
bool isDefaultSealEnabled () const
 Check if the default seal option is enabled (sealed after POR).
 
bool isNonRemovableSet () const
 Check if the non - removable option is set.
 
bool isIntBremEnabled () const
 Check if the INT_BREM function is enabled.
 
bool isIntBatLEnabled () const
 Check if the INT_BATL function is enabled.
 
bool isIntStateEnabled () const
 Check if the INT_STATE function is enabled.
 
bool isIntOcvEnabled () const
 Check if the INT_OCV function is enabled.
 
bool isIntOtEnabled () const
 Check if the INT_OT function is enabled.
 
bool isIntPolHigh () const
 Check if the INT_POL function is enabled (high - level polarity).
 
bool isIntFocvEnabled () const
 Check if the INT_FOCV function is enabled.
 

Detailed Description

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

Constructor & Destructor Documentation

◆ OperationConfig()

OperationConfig::OperationConfig ( uint32_t  registerValue)
inline

Constructor for OperationConfig class.

Parses the 16 - bit register value to initialize the member variables representing different configuration bits.

Parameters
registerValueA 16 - bit unsigned integer representing the Operation Config A register value.

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

Member Function Documentation

◆ canEnterSleep()

bool OperationConfig::canEnterSleep ( ) const
inline

Check if the fuel gauge can enter the SLEEP state.

Returns
True if the fuel gauge can enter the SLEEP state, false otherwise.

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

Referenced by setup().

◆ getConfigA()

uint16_t OperationConfig::getConfigA ( ) const
inline

Get the value in configuration register A.

Returns
Two unsigned byte values.

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

Referenced by setup().

◆ getConfigB()

uint16_t OperationConfig::getConfigB ( ) const
inline

Get the value in configuration register B.

Returns
Two unsigned byte values.

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

Referenced by setup().

◆ getPfcCfg()

int OperationConfig::getPfcCfg ( ) const
inline

Get the Pin Function Code (PFC) mode.

Returns
The PFC mode (0, 1, 2, or 3).

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

Referenced by setup().

◆ getWkTh0()

int OperationConfig::getWkTh0 ( ) const
inline

Get the Wake - up threshold 0 value.

Returns
The value of Wake - up threshold 0.

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

Referenced by setup().

◆ getWkTh1()

int OperationConfig::getWkTh1 ( ) const
inline

Get the Wake - up threshold 1 value.

Returns
The value of Wake - up threshold 1.

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

Referenced by setup().

◆ isBatgEnEnabled()

bool OperationConfig::isBatgEnEnabled ( ) const
inline

Check if the BATT_GD function is enabled.

Returns
True if the BATT_GD function is enabled, false otherwise.

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

Referenced by setup().

◆ isBatgPolHigh()

bool OperationConfig::isBatgPolHigh ( ) const
inline

Check the BATT_GD pin polarity.

Returns
True if the BATT_GD pin is high - level, false if it is low - level.

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

Referenced by setup().

◆ isBienableEnabled()

bool OperationConfig::isBienableEnabled ( ) const
inline

Check if battery insertion detection is enabled.

Returns
True if battery insertion detection is enabled, false otherwise.

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

Referenced by setup().

◆ isBlPupEnEnabled()

bool OperationConfig::isBlPupEnEnabled ( ) const
inline

Check if the battery insertion pin pull - up is enabled.

Returns
True if the battery insertion pin pull - up is enabled, false otherwise.

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

Referenced by setup().

◆ isDefaultSealEnabled()

bool OperationConfig::isDefaultSealEnabled ( ) const
inline

Check if the default seal option is enabled (sealed after POR).

Returns
True if enabled, false otherwise.

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

Referenced by setup().

◆ isIntBatLEnabled()

bool OperationConfig::isIntBatLEnabled ( ) const
inline

Check if the INT_BATL function is enabled.

Returns
True if enabled, false otherwise.

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

Referenced by setup().

◆ isIntBremEnabled()

bool OperationConfig::isIntBremEnabled ( ) const
inline

Check if the INT_BREM function is enabled.

Returns
True if enabled, false otherwise.

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

Referenced by setup().

◆ isIntFocvEnabled()

bool OperationConfig::isIntFocvEnabled ( ) const
inline

Check if the INT_FOCV function is enabled.

Returns
True if enabled, false otherwise.

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

Referenced by setup().

◆ isIntOcvEnabled()

bool OperationConfig::isIntOcvEnabled ( ) const
inline

Check if the INT_OCV function is enabled.

Returns
True if enabled, false otherwise.

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

Referenced by setup().

◆ isIntOtEnabled()

bool OperationConfig::isIntOtEnabled ( ) const
inline

Check if the INT_OT function is enabled.

Returns
True if enabled, false otherwise.

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

Referenced by setup().

◆ isIntPolHigh()

bool OperationConfig::isIntPolHigh ( ) const
inline

Check if the INT_POL function is enabled (high - level polarity).

Returns
True if enabled, false otherwise.

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

Referenced by setup().

◆ isIntStateEnabled()

bool OperationConfig::isIntStateEnabled ( ) const
inline

Check if the INT_STATE function is enabled.

Returns
True if enabled, false otherwise.

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

Referenced by setup().

◆ isNonRemovableSet()

bool OperationConfig::isNonRemovableSet ( ) const
inline

Check if the non - removable option is set.

Returns
True if set, false otherwise.

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

Referenced by setup().

◆ isSlpwakechgEnabled()

bool OperationConfig::isSlpwakechgEnabled ( ) const
inline

Check if the slpwakechg function is enabled.

Returns
True if the slpwakechg function is enabled, false otherwise.

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

Referenced by setup().

◆ isTempsSet()

bool OperationConfig::isTempsSet ( ) const
inline

Check if the external thermistor is selected for temperature measurement.

Returns
True if the external thermistor is selected, false otherwise.

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

Referenced by setup().

◆ isWakeEnEnabled()

bool OperationConfig::isWakeEnEnabled ( ) const
inline

Check if the wake - up function is enabled.

Returns
True if the wake - up function is enabled, false otherwise.

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

Referenced by setup().

◆ isWrtempEnabled()

bool OperationConfig::isWrtempEnabled ( ) const
inline

Check if the write temperature function is enabled.

Returns
True if the write temperature function is enabled, false otherwise.

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

Referenced by setup().


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