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:
- 1:a031f0c6a71e
- Parent:
- 0:80c39eb8f3ba
- Child:
- 2:ff7db397b70f
--- a/max17055.h Thu Sep 21 00:53:05 2017 +0000 +++ b/max17055.h Thu Sep 21 22:35:39 2017 +0000 @@ -247,7 +247,7 @@ -protected: +//protected: /** * @brief Write Register * @details Writes data to max17055 Register @@ -263,7 +263,23 @@ * * @parameters reg_addr Register to read */ - int32_t readReg(Registers_e reg_addr, uint8_t &value); + int32_t readReg(Registers_e reg_addr, uint16_t &value); + + /** + * \brief Write and Verify a MAX17055 register + * \par Details + * This function wites and verifies if the writing process was successful + * + * \param[in] reg_addr - register address + * \param[out] reg_data - the variable that contains the data to write + * to the register address + * + * \retval 1 on success + * -1 if errors exist + */ + + + int write_and_verify_reg(Registers_e reg_addr, uint16_t reg_data);