⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 protocol.h

📁 使用avr--cc2420模块程序,需要原理图的联系 QQ:120304948
💻 H
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -