Lib LTC2944
Fork of LTC2944 by
Diff: LTC2944.h
- Revision:
- 1:378dc5a174ce
- Parent:
- 0:ec69fa9832e5
diff -r ec69fa9832e5 -r 378dc5a174ce LTC2944.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LTC2944.h Wed May 17 18:45:40 2017 +0000 @@ -0,0 +1,34 @@ + +#include "mbed.h" + + + +class LTC2944 { + public: + LTC2944(PinName sda, PinName scl); + float getVoltage(); + float getCurrent(); + unsigned short getAccumulatedCharge(); + float getTemp(); + void setRsense(float); + void setPrescaler(unsigned char); + void setMode(unsigned char); + void setImax(float); + void setImin(float); + unsigned char alertResponse(void); + unsigned char getStatus(void); + + + private: + + I2C i2c; + Serial pc; + float rsense; + float prescaler; + char datar[25]; + char dataw[3]; + int address; + }; + + +