no description
Fork of Middleware by
Sensors.h@1:32a08ca33b00, 2015-12-07 (annotated)
- Committer:
- Jorge_Beltran
- Date:
- Mon Dec 07 01:50:01 2015 +0000
- Revision:
- 1:32a08ca33b00
SensorsForGusProject
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jorge_Beltran | 1:32a08ca33b00 | 1 | #include "mbed.h" |
Jorge_Beltran | 1:32a08ca33b00 | 2 | |
Jorge_Beltran | 1:32a08ca33b00 | 3 | /*Macros*/ |
Jorge_Beltran | 1:32a08ca33b00 | 4 | #define BAD_PARAMETER (-1) |
Jorge_Beltran | 1:32a08ca33b00 | 5 | #define OFF 0 |
Jorge_Beltran | 1:32a08ca33b00 | 6 | #define ON 1 |
Jorge_Beltran | 1:32a08ca33b00 | 7 | #define FALSE 0 |
Jorge_Beltran | 1:32a08ca33b00 | 8 | #define TRUE 1 |
Jorge_Beltran | 1:32a08ca33b00 | 9 | #define CLOSED 0 |
Jorge_Beltran | 1:32a08ca33b00 | 10 | #define OPEN 1 |
Jorge_Beltran | 1:32a08ca33b00 | 11 | |
Jorge_Beltran | 1:32a08ca33b00 | 12 | /*Extern Variables*/ |
Jorge_Beltran | 1:32a08ca33b00 | 13 | |
Jorge_Beltran | 1:32a08ca33b00 | 14 | |
Jorge_Beltran | 1:32a08ca33b00 | 15 | /*Extern Functions*/ |
Jorge_Beltran | 1:32a08ca33b00 | 16 | //////////////////////////////////////////////////// |
Jorge_Beltran | 1:32a08ca33b00 | 17 | extern bool GetPrescenceStatus(); |
Jorge_Beltran | 1:32a08ca33b00 | 18 | /* GetPrescenceStatus: |
Jorge_Beltran | 1:32a08ca33b00 | 19 | Input parameters -> void |
Jorge_Beltran | 1:32a08ca33b00 | 20 | Output parameters -> bool RoomStatus; 0-> No Prescence Detected |
Jorge_Beltran | 1:32a08ca33b00 | 21 | 1-> Prescence Detected |
Jorge_Beltran | 1:32a08ca33b00 | 22 | */ |
Jorge_Beltran | 1:32a08ca33b00 | 23 | |
Jorge_Beltran | 1:32a08ca33b00 | 24 | //////////////////////////////////////////////////// |
Jorge_Beltran | 1:32a08ca33b00 | 25 | extern bool GetDoorStatus(); |
Jorge_Beltran | 1:32a08ca33b00 | 26 | /* GetDoorStatus: |
Jorge_Beltran | 1:32a08ca33b00 | 27 | Input parameters -> void |
Jorge_Beltran | 1:32a08ca33b00 | 28 | Output parameters -> bool DoorStatus; 0-> Door Closed |
Jorge_Beltran | 1:32a08ca33b00 | 29 | 1-> Door Open |
Jorge_Beltran | 1:32a08ca33b00 | 30 | */ |
Jorge_Beltran | 1:32a08ca33b00 | 31 | |
Jorge_Beltran | 1:32a08ca33b00 | 32 | //////////////////////////////////////////////////// |
Jorge_Beltran | 1:32a08ca33b00 | 33 | extern int GetWindowStatus(int window); |
Jorge_Beltran | 1:32a08ca33b00 | 34 | /* GetWindowStatus: |
Jorge_Beltran | 1:32a08ca33b00 | 35 | Input parameters -> int window |
Jorge_Beltran | 1:32a08ca33b00 | 36 | Output parameters -> int WindowStatus; -1-> Bad parameter or error |
Jorge_Beltran | 1:32a08ca33b00 | 37 | 0-> Window Closed |
Jorge_Beltran | 1:32a08ca33b00 | 38 | 1-> Window Open |
Jorge_Beltran | 1:32a08ca33b00 | 39 | */ |
Jorge_Beltran | 1:32a08ca33b00 | 40 | |
Jorge_Beltran | 1:32a08ca33b00 | 41 | //////////////////////////////////////////////////// |
Jorge_Beltran | 1:32a08ca33b00 | 42 | extern int SetLight(bool Light); |
Jorge_Beltran | 1:32a08ca33b00 | 43 | /* SetLight: |
Jorge_Beltran | 1:32a08ca33b00 | 44 | Input parameters -> bool Light; 0-> Light is OFF |
Jorge_Beltran | 1:32a08ca33b00 | 45 | 1-> Light is ON |
Jorge_Beltran | 1:32a08ca33b00 | 46 | |
Jorge_Beltran | 1:32a08ca33b00 | 47 | Output parameters -> int WindowStatus; -1-> Bad parameter or error |
Jorge_Beltran | 1:32a08ca33b00 | 48 | 0-> Light is OFF |
Jorge_Beltran | 1:32a08ca33b00 | 49 | 1-> Light is ON |
Jorge_Beltran | 1:32a08ca33b00 | 50 | */ |
Jorge_Beltran | 1:32a08ca33b00 | 51 | |
Jorge_Beltran | 1:32a08ca33b00 | 52 | //////////////////////////////////////////////////// |
Jorge_Beltran | 1:32a08ca33b00 | 53 | extern unsigned int GetPersonStatus(); |
Jorge_Beltran | 1:32a08ca33b00 | 54 | /* GetPersonStatus: |
Jorge_Beltran | 1:32a08ca33b00 | 55 | Input parameters -> void |
Jorge_Beltran | 1:32a08ca33b00 | 56 | |
Jorge_Beltran | 1:32a08ca33b00 | 57 | Output parameters -> unsigned int PersonNumber; 0 - 4294967296. |
Jorge_Beltran | 1:32a08ca33b00 | 58 | */ |