Bruno Manganelli
/
Adafruit9-DOf
Port of Adafruit Arduino code
Source/I2C_base.cpp@0:772bf4786416, 2015-03-21 (annotated)
- Committer:
- bmanga95
- Date:
- Sat Mar 21 12:33:05 2015 +0000
- Revision:
- 0:772bf4786416
First version
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_ |