libpropeller
Making PropellerGCC Easier
|
Interface to the MAX17048 Fuel Chip. More...
#include <max17048.h>
Public Member Functions | |
MAX17048 () | |
Create a new MAX17048 instance. More... | |
bool | Init (I2C *bus) |
Initialize a MAX17048 object. More... | |
bool | GetStatus (void) |
Test the presence of the MAX17048 chip by pinging the bus. More... | |
int | GetStateOfCharge (void) |
Get the state of charge from the chip. More... | |
int | GetVoltage (void) |
Use the MAX17048 internal ADC, and get the voltage. More... | |
int | GetChargeRate (void) |
Fetches the rate of charge (positive or negative) More... | |
int | GetVersion (void) |
Fetches the hardware version of the MAX17048. More... | |
Interface to the MAX17048 Fuel Chip.
This chip monitors a single cell Lithium battery, and calculates metrics of battery use.
Hardware: The MAX17048 should be connected as described in the datasheet. The only connections required to the Propeller are via the I2C bus.
One MAX17948 can be connected per I2C bus.
(SRLM): Add temperature compensation
|
inline |
Create a new MAX17048 instance.
|
inline |
Fetches the rate of charge (positive or negative)
The charge rate is the change in battery state of charge over time. It should not be used to calculate current consumption (eg milliamps).
|
inline |
Get the state of charge from the chip.
The state of charge refers to the overall percentage of the battery remaining. The MAX17048 chip automatically adjusts for a number of features, including battery capacity.
|
inline |
|
inline |
Fetches the hardware version of the MAX17048.
|
inline |
Use the MAX17048 internal ADC, and get the voltage.
|
inline |