protocol.h

来自「使用avr--cc2420模块程序,需要原理图的联系 QQ:120304948」· C头文件 代码 · 共 46 行

H
46
字号
#ifndef __PROTOCOL_H__
#define __PROTOCOL_H__


#define PROTOCOL_BUFFER_LENGTH 64

extern eeprom unsigned char MobilePhone1[12];
extern eeprom unsigned char MobilePhone2[12];
extern eeprom unsigned char MobilePhone3[12];
extern eeprom unsigned int MY_ID;
extern unsigned int Protocol_pointer_last;
extern unsigned int Protocol_pointer_current;

extern bit bMobilePhone;
extern bit bAlarmValue;
extern bit bAlarmData;


void SetThreshold();
void ReadThreshold();
void SetMobile();
void SetClock();
void ReadHistoryData();
void ConfirmMobilePhone();
void ConfirmAlarmValue();
void ConfirmAlarmData();
void uploadMobile();
void uploadAlarmValue();
void uploadRealtimeData();
void uploadAlarmData(unsigned char value);


/* hex to bcd */
unsigned char hex2bcd(unsigned char hdata);
/* bcd to hex */
unsigned int bcd2hex(BYTE bdata);

void initial_protocol(void);
void ProtocolProc(void);
void SerialPortWrite(BYTE *pBuf, int nLength);



#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?