portable version of the cumulocity demo
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
DeviceIO.h@41:804f6a0bda26, 2014-07-15 (annotated)
- Committer:
- Cumulocity
- Date:
- Tue Jul 15 12:44:34 2014 +0000
- Revision:
- 41:804f6a0bda26
- Child:
- 46:f6976fd64387
refactoring of mbed agent
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Cumulocity | 41:804f6a0bda26 | 1 | #ifndef DEVICEIO_H |
Cumulocity | 41:804f6a0bda26 | 2 | #define DEVICEIO_H |
Cumulocity | 41:804f6a0bda26 | 3 | |
Cumulocity | 41:804f6a0bda26 | 4 | #include "mbed.h" |
Cumulocity | 41:804f6a0bda26 | 5 | #include "LM75B.h" |
Cumulocity | 41:804f6a0bda26 | 6 | #include "MMA7660.h" |
Cumulocity | 41:804f6a0bda26 | 7 | #include "C12832.h" |
Cumulocity | 41:804f6a0bda26 | 8 | |
Cumulocity | 41:804f6a0bda26 | 9 | #define A0 P0_23 |
Cumulocity | 41:804f6a0bda26 | 10 | #define A1 P0_24 |
Cumulocity | 41:804f6a0bda26 | 11 | #define A2 P0_25 |
Cumulocity | 41:804f6a0bda26 | 12 | #define A3 P0_26 |
Cumulocity | 41:804f6a0bda26 | 13 | #define A4 P0_30 |
Cumulocity | 41:804f6a0bda26 | 14 | #define A5 P1_31 |
Cumulocity | 41:804f6a0bda26 | 15 | |
Cumulocity | 41:804f6a0bda26 | 16 | #define D0 P4_29 |
Cumulocity | 41:804f6a0bda26 | 17 | #define D1 P4_28 |
Cumulocity | 41:804f6a0bda26 | 18 | #define D2 P2_13 |
Cumulocity | 41:804f6a0bda26 | 19 | #define D3 P2_0 |
Cumulocity | 41:804f6a0bda26 | 20 | #define D4 P2_12 |
Cumulocity | 41:804f6a0bda26 | 21 | #define D5 P2_1 |
Cumulocity | 41:804f6a0bda26 | 22 | #define D6 P2_2 |
Cumulocity | 41:804f6a0bda26 | 23 | #define D7 P2_11 |
Cumulocity | 41:804f6a0bda26 | 24 | |
Cumulocity | 41:804f6a0bda26 | 25 | #define D8 P2_4 |
Cumulocity | 41:804f6a0bda26 | 26 | #define D9 P2_3 |
Cumulocity | 41:804f6a0bda26 | 27 | #define D10 P1_21 |
Cumulocity | 41:804f6a0bda26 | 28 | #define D11 P1_24 |
Cumulocity | 41:804f6a0bda26 | 29 | #define D12 P1_23 |
Cumulocity | 41:804f6a0bda26 | 30 | #define D13 P1_20 |
Cumulocity | 41:804f6a0bda26 | 31 | |
Cumulocity | 41:804f6a0bda26 | 32 | #define SDA P0_0 |
Cumulocity | 41:804f6a0bda26 | 33 | #define SCL P0_1 |
Cumulocity | 41:804f6a0bda26 | 34 | |
Cumulocity | 41:804f6a0bda26 | 35 | class DeviceIO |
Cumulocity | 41:804f6a0bda26 | 36 | { |
Cumulocity | 41:804f6a0bda26 | 37 | public: |
Cumulocity | 41:804f6a0bda26 | 38 | DeviceIO(); |
Cumulocity | 41:804f6a0bda26 | 39 | |
Cumulocity | 41:804f6a0bda26 | 40 | LM75B& temperatureSensor(); |
Cumulocity | 41:804f6a0bda26 | 41 | MMA7660& accelerometer(); |
Cumulocity | 41:804f6a0bda26 | 42 | void lcdPrint(const char*, const char* = NULL, const char* = NULL); |
Cumulocity | 41:804f6a0bda26 | 43 | |
Cumulocity | 41:804f6a0bda26 | 44 | private: |
Cumulocity | 41:804f6a0bda26 | 45 | LM75B _temperatureSensor; |
Cumulocity | 41:804f6a0bda26 | 46 | MMA7660 _accelerometer; |
Cumulocity | 41:804f6a0bda26 | 47 | C12832 _lcd; |
Cumulocity | 41:804f6a0bda26 | 48 | }; |
Cumulocity | 41:804f6a0bda26 | 49 | |
Cumulocity | 41:804f6a0bda26 | 50 | #endif |