This is a library for the MAX17055 Li+ Battery Fuel Gauge.
Dependents: Low_Power_Long_Distance_IR_Vision_Robot MAX17055_EZconfig MAX17055_EZconfig_Sample Low_Power_Long_Distance_IR_Vision_Robot
Fork of max17055 by
Diff: max17055.h
- Revision:
- 8:ca8765c30ed2
- Parent:
- 7:479a36909ced
- Child:
- 9:f29d5e49b190
diff -r 479a36909ced -r ca8765c30ed2 max17055.h --- a/max17055.h Tue Oct 10 00:06:40 2017 +0000 +++ b/max17055.h Thu Nov 02 18:11:16 2017 +0000 @@ -176,7 +176,8 @@ VCELL_REG = 0x09, /**< 0x08 */ CURRENT_REG = 0x0A, /**< 0x0A */ AVGCURRENT_REG = 0x0B, /**< 0x0B */ - REMCAP_REG = 0x0F, /**< 0x0F */ + AVSOC_REG = 0x0E, + MIXCAP_REG = 0x0F, /**< 0x0F */ FULLCAPREP_REG = 0x10, /**< 0x10 */ TTE_REG = 0X11, /**< 0x11 */ @@ -189,6 +190,7 @@ CONFIG_REG = 0x1D, /**< 0x1D */ ICHGTERM_REG = 0x1E, /**< 0x1E */ + TTF_REG = 0x20, VERSION_REG = 0x21, /**< 0x21 */ QRTABLE10_REG = 0x22, FULLCAPNOM_REG = 0x23, @@ -419,6 +421,24 @@ int get_SOC(); + + /////////////////////////////////////////////////////////////////////////// + + /** + * \brief Get Average State Of Charge(SOC) Function for MAX17055 + * \par Details + * This function sends a request to access the internal + * of the MAX17055 + * + * \param[in] reg_addr - register address + * \param[out] reg_data - SOC data from the REPSOC_REG register + * \retval 1 on success + * + * -1 if errors exist + */ + + + int get_avSOC(); //////////////////////////////////////////////////////////////////////////// @@ -435,6 +455,22 @@ int get_TTE(); + + //////////////////////////////////////////////////////////////////////////// + + /** + * \brief Get the remaining Time to Full(TTE) Function for MAX17055 + * \par Details + * This function sends a request to access the internal register + * of the MAX17055 + * + * \retval ttf_data - Time to Empty data from the TTF_REG register + * + * -1 if errors exist + */ + + + int get_TTF(); ////////////////////////////////////////////////////////////////////////////