![](/media/cache/profiles/4b602c3f2f6b86b43ad406fd438e09a8.jpg.50x50_q85.jpg)
RaheeNew
Fork of Adafruit9-DOf by
Source/I2C_base.cpp@1:c3381056a1c6, 2015-11-28 (annotated)
- Committer:
- jatinsha
- Date:
- Sat Nov 28 10:06:40 2015 +0000
- Revision:
- 1:c3381056a1c6
- Parent:
- 0:772bf4786416
js
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bmanga95 | 0:772bf4786416 | 1 | #include "I2C_base.h" |
bmanga95 | 0:772bf4786416 | 2 | |
bmanga95 | 0:772bf4786416 | 3 | #ifdef _MBED_ |
bmanga95 | 0:772bf4786416 | 4 | |
bmanga95 | 0:772bf4786416 | 5 | //setup the right i2c class |
bmanga95 | 0:772bf4786416 | 6 | I2C_base* i2c = new I2C_MBED(SDA, SCL); |
bmanga95 | 0:772bf4786416 | 7 | |
bmanga95 | 0:772bf4786416 | 8 | //setup millis function |
bmanga95 | 0:772bf4786416 | 9 | Timer p_t; |
bmanga95 | 0:772bf4786416 | 10 | int millis() |
bmanga95 | 0:772bf4786416 | 11 | { |
bmanga95 | 0:772bf4786416 | 12 | return p_t.read_ms(); |
bmanga95 | 0:772bf4786416 | 13 | } |
bmanga95 | 0:772bf4786416 | 14 | |
bmanga95 | 0:772bf4786416 | 15 | |
bmanga95 | 0:772bf4786416 | 16 | #endif //_MBED_ |