test

Dependencies:   MTS-Serial libmDot mbed-rtos mbed

Fork of mDot_LoRa_Connect_Example by ivan florido

macro.h

Committer:
hmiot
Date:
2017-11-08
Revision:
6:f87d57498fd0
Parent:
2:20a5d4681abf

File content as of revision 6:f87d57498fd0:

#ifndef _MACRO_H
#define _MACRO_H

#define STOP_BIT 1
#define DATA_BIT 8
#define BAURD_RATE 115200
unsigned char IEEE_SM1[8] = {0x3C, 0xC1, 0xF6, 0x00, 0x00, 0x00, 0x09, 0x3D};  //light .. wait(5);
unsigned char IEEE_SM2[8] = {0x3C, 0xC1, 0xF6, 0x00, 0x00, 0x00, 0x09, 0x40};   //lamp .. wait(2)
unsigned char IEEE_SM3[8] = {0x3C, 0xc1, 0xf6, 0x00, 0x00, 0x00, 0x09, 0x3F}; //Tv   ... wait(4)

#define Light_bulb 1
#define Light_lamp 2
#define Tv 3

#define NETWORK_ADDRESS     0xFFFF
#define SOURCE_ENDPOINT     0x0C
#define CLUSTER_ID          0x0006
#define PAYLOAD             0x1101

#define MSB(i)  ((i >> 8) & 0x00FF)
#define LSB(i)  (i & 0xFF)

#define NETWORK_ADDRESS     0xFFFF
#define SOURCE_ENDPOINT     0x0C
#define CLUSTER_ID          0x0006
#define PAYLOAD             0x1101


#define START_BYTE_AT   0x2B
#define START_BYTE      0x2D

#define OFF          00
#define ON           01


#endif