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 16:02:47 2014 +0000
Revision:
46:f6976fd64387
Parent:
41:804f6a0bda26
Child:
47:89ae46d5c466
implement device credential reset; show username/password on display

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 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 46:f6976fd64387 40 bool resetButtonPressed();
Cumulocity 41:804f6a0bda26 41 LM75B& temperatureSensor();
Cumulocity 41:804f6a0bda26 42 MMA7660& accelerometer();
Cumulocity 41:804f6a0bda26 43 void lcdPrint(const char*, const char* = NULL, const char* = NULL);
Cumulocity 41:804f6a0bda26 44
Cumulocity 41:804f6a0bda26 45 private:
Cumulocity 46:f6976fd64387 46 DigitalIn _resetButton;
Cumulocity 41:804f6a0bda26 47 LM75B _temperatureSensor;
Cumulocity 41:804f6a0bda26 48 MMA7660 _accelerometer;
Cumulocity 41:804f6a0bda26 49 C12832 _lcd;
Cumulocity 41:804f6a0bda26 50 };
Cumulocity 41:804f6a0bda26 51
Cumulocity 41:804f6a0bda26 52 #endif