This is a library for the MAX17055 Li+ Battery Fuel Gauge.
Fork of max17055 by
Diff: max17055.h
- Revision:
- 10:f145eb7522ff
- Parent:
- 9:f29d5e49b190
- Child:
- 11:bdbd3104995b
--- a/max17055.h Tue Feb 06 21:10:30 2018 +0000 +++ b/max17055.h Tue Feb 06 21:14:08 2018 +0000 @@ -98,35 +98,6 @@ * @endcode */ - - -//! BATTERY Battery Parameters Class -/*! - Generic API for battery parameters - */ -class BATTERY -{ - -public: - - - struct battery_cfg_t{ - int capacity; //!< The rated capacity in mAh of the battery - int voltageMax; //!< The maximum voltage in mV that should be used for charging - int voltageNom; //!< The normal voltage in mV of the battery near mid charge - int voltageMin; //!< The minimum voltage in mV that the battery should be discharged - int temperatureMax; //!< The maximum temperature in degrees C where charging is allowed - int temperatureMin; //!< The minimum temperature in degrees C where charging is allowed - int currentCharge; //!< The current as a percentage of capicity used for charging - int currentTerm; //!< The current as a percentage of capacity to stop charging - int currentPre; //!< The current as a percentage of capacity for pre-charging - } ; - - - - -}; - /******************************************************************//** * MAX17055 Class **********************************************************************/ @@ -296,6 +267,34 @@ } ; +/******************************************************************//** +* BATTERY Class +**********************************************************************/ +/// Battery Class +/** Generic API for a battery fuel gauge + +class BATTERY +{ + +public: + + + struct battery_cfg_t{ + int capacity; //!< The rated capacity in mAh of the battery + int voltageMax; //!< The maximum voltage in mV that should be used for charging + int voltageNom; //!< The normal voltage in mV of the battery near mid charge + int voltageMin; //!< The minimum voltage in mV that the battery should be discharged + int temperatureMax; //!< The maximum temperature in degrees C where charging is allowed + int temperatureMin; //!< The minimum temperature in degrees C where charging is allowed + int currentCharge; //!< The current as a percentage of capicity used for charging + int currentTerm; //!< The current as a percentage of capacity to stop charging + int currentPre; //!< The current as a percentage of capacity for pre-charging + } ; + + + + +};