portable version of the cumulocity demo

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Cumulocity Official

Committer:
Cumulocity
Date:
Thu Jul 24 23:32:53 2014 +0000
Revision:
47:89ae46d5c466
Parent:
46:f6976fd64387
Child:
55:ed3a2751a2b5
major update

Who changed what in which revision?

UserRevisionLine numberNew 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 47:89ae46d5c466 5 #include "GPSTracker.h"
Cumulocity 47:89ae46d5c466 6 #include "GPS.h"
Cumulocity 41:804f6a0bda26 7 #include "LM75B.h"
Cumulocity 41:804f6a0bda26 8 #include "MMA7660.h"
Cumulocity 41:804f6a0bda26 9 #include "C12832.h"
Cumulocity 41:804f6a0bda26 10
Cumulocity 41:804f6a0bda26 11 #define A0 P0_23
Cumulocity 41:804f6a0bda26 12 #define A1 P0_24
Cumulocity 41:804f6a0bda26 13 #define A2 P0_25
Cumulocity 41:804f6a0bda26 14 #define A3 P0_26
Cumulocity 41:804f6a0bda26 15 #define A4 P0_30
Cumulocity 41:804f6a0bda26 16 #define A5 P1_31
Cumulocity 41:804f6a0bda26 17
Cumulocity 41:804f6a0bda26 18 #define D0 P4_29
Cumulocity 41:804f6a0bda26 19 #define D1 P4_28
Cumulocity 41:804f6a0bda26 20 #define D2 P2_13
Cumulocity 41:804f6a0bda26 21 #define D3 P2_0
Cumulocity 41:804f6a0bda26 22 #define D4 P2_12
Cumulocity 41:804f6a0bda26 23 #define D5 P2_1
Cumulocity 41:804f6a0bda26 24 #define D6 P2_2
Cumulocity 41:804f6a0bda26 25 #define D7 P2_11
Cumulocity 41:804f6a0bda26 26
Cumulocity 41:804f6a0bda26 27 #define D8 P2_4
Cumulocity 41:804f6a0bda26 28 #define D9 P2_3
Cumulocity 41:804f6a0bda26 29 #define D10 P1_21
Cumulocity 41:804f6a0bda26 30 #define D11 P1_24
Cumulocity 41:804f6a0bda26 31 #define D12 P1_23
Cumulocity 41:804f6a0bda26 32 #define D13 P1_20
Cumulocity 41:804f6a0bda26 33
Cumulocity 41:804f6a0bda26 34 #define SDA P0_0
Cumulocity 41:804f6a0bda26 35 #define SCL P0_1
Cumulocity 41:804f6a0bda26 36
Cumulocity 41:804f6a0bda26 37 class DeviceIO
Cumulocity 41:804f6a0bda26 38 {
Cumulocity 41:804f6a0bda26 39 public:
Cumulocity 47:89ae46d5c466 40 DeviceIO(GPSI2C&);
Cumulocity 41:804f6a0bda26 41
Cumulocity 46:f6976fd64387 42 bool resetButtonPressed();
Cumulocity 47:89ae46d5c466 43 GPSTracker& gpsTracker();
Cumulocity 47:89ae46d5c466 44 AnalogIn& analog1();
Cumulocity 47:89ae46d5c466 45 AnalogIn& analog2();
Cumulocity 41:804f6a0bda26 46 LM75B& temperatureSensor();
Cumulocity 41:804f6a0bda26 47 MMA7660& accelerometer();
Cumulocity 41:804f6a0bda26 48 void lcdPrint(const char*, const char* = NULL, const char* = NULL);
Cumulocity 41:804f6a0bda26 49
Cumulocity 41:804f6a0bda26 50 private:
Cumulocity 47:89ae46d5c466 51 GPSTracker _gpsTracker;
Cumulocity 46:f6976fd64387 52 DigitalIn _resetButton;
Cumulocity 47:89ae46d5c466 53 AnalogIn _analog1;
Cumulocity 47:89ae46d5c466 54 AnalogIn _analog2;
Cumulocity 41:804f6a0bda26 55 LM75B _temperatureSensor;
Cumulocity 41:804f6a0bda26 56 MMA7660 _accelerometer;
Cumulocity 41:804f6a0bda26 57 C12832 _lcd;
Cumulocity 41:804f6a0bda26 58 };
Cumulocity 41:804f6a0bda26 59
Cumulocity 41:804f6a0bda26 60 #endif