test
Dependencies: MTS-Serial libmDot mbed-rtos mbed
Fork of mDot_LoRa_Connect_Example by
macro.h@6:f87d57498fd0, 2017-11-08 (annotated)
- Committer:
- hmiot
- Date:
- Wed Nov 08 12:10:51 2017 +0000
- Revision:
- 6:f87d57498fd0
- Parent:
- 2:20a5d4681abf
Updated for Zigo Demo
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hariom | 2:20a5d4681abf | 1 | #ifndef _MACRO_H |
hariom | 2:20a5d4681abf | 2 | #define _MACRO_H |
hariom | 2:20a5d4681abf | 3 | |
hariom | 2:20a5d4681abf | 4 | #define STOP_BIT 1 |
hariom | 2:20a5d4681abf | 5 | #define DATA_BIT 8 |
hariom | 2:20a5d4681abf | 6 | #define BAURD_RATE 115200 |
hariom | 2:20a5d4681abf | 7 | unsigned char IEEE_SM1[8] = {0x3C, 0xC1, 0xF6, 0x00, 0x00, 0x00, 0x09, 0x3D}; //light .. wait(5); |
hariom | 2:20a5d4681abf | 8 | unsigned char IEEE_SM2[8] = {0x3C, 0xC1, 0xF6, 0x00, 0x00, 0x00, 0x09, 0x40}; //lamp .. wait(2) |
hariom | 2:20a5d4681abf | 9 | unsigned char IEEE_SM3[8] = {0x3C, 0xc1, 0xf6, 0x00, 0x00, 0x00, 0x09, 0x3F}; //Tv ... wait(4) |
hariom | 2:20a5d4681abf | 10 | |
hariom | 2:20a5d4681abf | 11 | #define Light_bulb 1 |
hariom | 2:20a5d4681abf | 12 | #define Light_lamp 2 |
hariom | 2:20a5d4681abf | 13 | #define Tv 3 |
hariom | 2:20a5d4681abf | 14 | |
hariom | 2:20a5d4681abf | 15 | #define NETWORK_ADDRESS 0xFFFF |
hariom | 2:20a5d4681abf | 16 | #define SOURCE_ENDPOINT 0x0C |
hariom | 2:20a5d4681abf | 17 | #define CLUSTER_ID 0x0006 |
hariom | 2:20a5d4681abf | 18 | #define PAYLOAD 0x1101 |
hariom | 2:20a5d4681abf | 19 | |
hariom | 2:20a5d4681abf | 20 | #define MSB(i) ((i >> 8) & 0x00FF) |
hariom | 2:20a5d4681abf | 21 | #define LSB(i) (i & 0xFF) |
hariom | 2:20a5d4681abf | 22 | |
hariom | 2:20a5d4681abf | 23 | #define NETWORK_ADDRESS 0xFFFF |
hariom | 2:20a5d4681abf | 24 | #define SOURCE_ENDPOINT 0x0C |
hariom | 2:20a5d4681abf | 25 | #define CLUSTER_ID 0x0006 |
hariom | 2:20a5d4681abf | 26 | #define PAYLOAD 0x1101 |
hariom | 2:20a5d4681abf | 27 | |
hariom | 2:20a5d4681abf | 28 | |
hariom | 2:20a5d4681abf | 29 | #define START_BYTE_AT 0x2B |
hariom | 2:20a5d4681abf | 30 | #define START_BYTE 0x2D |
hariom | 2:20a5d4681abf | 31 | |
hariom | 2:20a5d4681abf | 32 | #define OFF 00 |
hariom | 2:20a5d4681abf | 33 | #define ON 01 |
hariom | 2:20a5d4681abf | 34 | |
hariom | 2:20a5d4681abf | 35 | |
hariom | 2:20a5d4681abf | 36 | #endif |