An improved version of mbed's I2C class.
Dependents: acd52832_Humidity_Temp_Example BB acnSensa_LIS aconnoCellularGnss ... more
Diff: aconno_i2c.h
- Revision:
- 4:db46d6bb60f0
- Parent:
- 2:3c0eab894a4b
- Child:
- 6:4d1b387c12c3
--- a/aconno_i2c.h Tue Jan 02 15:46:59 2018 +0000 +++ b/aconno_i2c.h Thu May 24 17:50:45 2018 +0200 @@ -9,7 +9,7 @@ #ifndef ACONNO_I2C_H #define ACONNO_I2C_H - + #include "mbed.h" class aconno_i2c{ @@ -17,7 +17,8 @@ aconno_i2c(I2C *i2c, char address); uint8_t writeToReg(char regAddress, char *data, int len); uint8_t readFromReg(char regAddress, char *dataBuffer, int len); - uint8_t sendCommand(char *command, uint8_t len, char *response, uint8_t responseLen); + uint8_t sendCommand(char *command, uint8_t len, char *response, + uint8_t responseLen, bool repeated = false); uint8_t sendCommand(char *command, uint8_t len); uint8_t readBus(char *dataBuffer, int len); private: @@ -25,4 +26,5 @@ I2C *i2c; }; -#endif // ACONNO_I2C_H \ No newline at end of file +#endif // ACONNO_I2C_H +