#include "stdint.h"

#define READPAINID 		0x0302 //读取模块PAINID  FC 03 02 00 00 00 X0R

#define SETPINID   		0x0602 //设置模块PAINID  FC 06 02 00 XX XX X0R

#define SETCHANNEL 		0x0609 //设置模块信道    FC 06 09 00 XX 00 X0R

#define READZIGBEENET 0x0309 //读取设备ZIGBEE网络状态 FC 03 09 00 00 00 X0R 

#define READDEVTYPE   0x0311 //读取设备类型(00--协调器，01--路由器)，FC 03 11 00 00 00 X0R 

#define SETDEVTYPE    0x0611 //设置设备类型(00--协调器，01--路由器)，FC 06 11 00 XX 00 X0R 

#define SETNETSN      0x0615 //设置网络密钥 FC 06 15 00 X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X0R

#define ZIGCLEARNET   0x0618 //清除网络环境

#define READZIGSTATE  0x0308 //读取设备状态 FC 03 08 00 00 00 X0R

#define DEFAULTSTATE	0x0601 //默认状态

#define COORDINATOR	0x00 //协调器

#define ROUTTER   	0x01 //路由器

extern uint8_t g_ucZigbeeCmdResLen;//zigbee接收命令长度

extern uint8_t g_ucZigbeeCmdRes;//zigbee命令长度

extern uint8_t g_ucCurZigState;//zigbee当前状态

uint8_t ZigSetPainID(uint16_t uiID);

uint8_t ZigReadPainID(void);

uint8_t ZigSetDevType(uint8_t ucType);

uint8_t ZigSetChannel(uint8_t ucChannel);

uint8_t ZigReadState(void);

uint8_t ZigbeeInit(uint8_t ucType);

uint8_t ZigDefaultInit(void);


