
rtos test
Fork of rtos-test by
bldc/i2c_helper.h@1:ae213d6a0adf, 2016-05-14 (annotated)
- Committer:
- machines94
- Date:
- Sat May 14 21:15:12 2016 +0000
- Revision:
- 1:ae213d6a0adf
Electromobility 2016
;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
machines94 | 1:ae213d6a0adf | 1 | #ifndef I2C_HELPER_H |
machines94 | 1:ae213d6a0adf | 2 | #define I2C_HELPER_H |
machines94 | 1:ae213d6a0adf | 3 | |
machines94 | 1:ae213d6a0adf | 4 | #include "mbed.h" |
machines94 | 1:ae213d6a0adf | 5 | |
machines94 | 1:ae213d6a0adf | 6 | class i2c_helper{ |
machines94 | 1:ae213d6a0adf | 7 | public: |
machines94 | 1:ae213d6a0adf | 8 | i2c_helper(I2C* i2c, int addr); |
machines94 | 1:ae213d6a0adf | 9 | int write_message(char code, char byte1, char byte2, char cmd[]); |
machines94 | 1:ae213d6a0adf | 10 | |
machines94 | 1:ae213d6a0adf | 11 | private: |
machines94 | 1:ae213d6a0adf | 12 | int addr; |
machines94 | 1:ae213d6a0adf | 13 | I2C* i2c; |
machines94 | 1:ae213d6a0adf | 14 | }; |
machines94 | 1:ae213d6a0adf | 15 | #endif |