A feature complete driver for the MAX17048 lithium fuel gauge from Maxim.
Dependents: MAX17048_HelloWorld ECGAFE_copy MAX17048_HelloWorld Orion_newPCB_test_LV ... more
Now fully tested!
Revision 8:65c889800b3a, committed 2013-11-12
- Comitter:
- neilt6
- Date:
- Tue Nov 12 21:43:55 2013 +0000
- Parent:
- 7:bf6972a21c61
- Child:
- 9:2c1d82ecd63c
- Commit message:
- Minor C++ syntax improvements
Changed in this revision
MAX17048.cpp | Show annotated file Show diff for this revision Revisions of this file |
MAX17048.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/MAX17048.cpp Tue Nov 12 17:48:11 2013 +0000 +++ b/MAX17048.cpp Tue Nov 12 21:43:55 2013 +0000 @@ -16,6 +16,9 @@ #include "MAX17048.h" +const char MAX17048::RCOMP0 = 0x97; +const int MAX17048::m_ADDR = (0x36 << 1); + MAX17048::MAX17048(PinName sda, PinName scl) : m_I2C(sda, scl) { //Set the I2C bus frequency to 400kHz
--- a/MAX17048.h Tue Nov 12 17:48:11 2013 +0000 +++ b/MAX17048.h Tue Nov 12 21:43:55 2013 +0000 @@ -56,7 +56,7 @@ public: /** The default compensation value for the MAX17048 */ - static const int RCOMP0 = 0x97; + static const char RCOMP0; /** Represents the different alert flags for the MAX17048 */ @@ -352,7 +352,7 @@ }; //Member constants - static const int m_ADDR = (0x36 << 1); + static const int m_ADDR; //Member variables I2C m_I2C;