Lib LTC2944

Fork of LTC2944 by ltc2944_team

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LTC2944.h Source File

LTC2944.h

00001 
00002 #include "mbed.h"  
00003 
00004 
00005 
00006 class LTC2944 {
00007     public:
00008     LTC2944(PinName sda, PinName scl);
00009     float getVoltage();
00010     float getCurrent();
00011     unsigned short getAccumulatedCharge();
00012     float getTemp();
00013     void setRsense(float);
00014     void setPrescaler(unsigned char);
00015     void setMode(unsigned char);
00016     void setImax(float);
00017     void setImin(float);
00018     unsigned char alertResponse(void);
00019     unsigned char getStatus(void);
00020     
00021     
00022     private:
00023     
00024     I2C i2c;
00025     Serial pc;
00026     float rsense;
00027     float prescaler;
00028     char datar[25];
00029     char dataw[3];
00030     int address;
00031     };
00032 
00033 
00034