An improved version of mbed's I2C class.
Dependents: acd52832_Humidity_Temp_Example BB acnSensa_LIS aconnoCellularGnss ... more
aconno_i2c.h
- Committer:
- jurica238814
- Date:
- 2017-09-22
- Revision:
- 0:bfefd65ef71d
- Child:
- 1:5ae1807e3902
File content as of revision 0:bfefd65ef71d:
/* * I2C library made by Jurica Resetar @ aconno * 2017 * More info @ aconno.de * jurica_resetar@yahoo.com * All right reserved * */ #ifndef ACONNO_I2C_H #define ACONNO_I2C_H #include "mbed.h" class aconno_i2c: public I2C{ public: aconno_i2c(PinName data, PinName clock, 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); private: uint8_t i2cAddress; }; #endif // ACONNO_I2C_H