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:
9:2c1d82ecd63c
Parent:
8:65c889800b3a
Child:
10:4f695111eb54
--- a/MAX17048.cpp	Tue Nov 12 21:43:55 2013 +0000
+++ b/MAX17048.cpp	Fri May 02 17:28:52 2014 +0000
@@ -19,10 +19,10 @@
 const char MAX17048::RCOMP0 = 0x97;
 const int MAX17048::m_ADDR = (0x36 << 1);
 
-MAX17048::MAX17048(PinName sda, PinName scl) : m_I2C(sda, scl)
+MAX17048::MAX17048(PinName sda, PinName scl, int hz) : m_I2C(sda, scl)
 {
-    //Set the I2C bus frequency to 400kHz
-    m_I2C.frequency(400000);
+    //Set the I2C bus frequency
+    m_I2C.frequency(hz);
 }
 
 bool MAX17048::open()