Plese use this class with my "i2cslave" class.
Dependents: 2016_mother_3 WRS2019_master WRS2020_mecanum_node WRS2021_mecanum_driver
i2cmaster.h
- Committer:
- sgrsn
- Date:
- 2016-04-16
- Revision:
- 1:f5811e90881f
- Parent:
- 0:8c3f6ccf349c
File content as of revision 1:f5811e90881f:
#ifndef MBED_I2CMASTER_H #define MBED_I2CMASTER_H #include "mbed.h" /*example********************************** * #include "mbed.h" * #include "i2cmaster.h" * * int main() * { * i2c myi2c(p9, p10); * while(1) * { * myi2c.put(0xa0, 1 20, 1); * wait(0.1); * myi2c.put(0xa0, 1 0, 1); * wait(0.1); * } * } ********************************************/ class i2c : public I2C { public: i2c(PinName sda,PinName scl); bool put(char addr,char reg, char data ,int size); }; #endif