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

📄 protocol.h

📁 NEC9222参考代码
💻 H
字号:
/* protocol.h */

#ifndef PROTOCOL_H
#define PROTOCOL_H

#ifdef __cplusplus
extern "C"
{
#endif

typedef unsigned char (*COMM_PROC_PTR)(void);


//#define RF_MCU_DELAY                1               


extern unsigned char rf_new_period_flag;


unsigned char send8bit(unsigned char a8bit);
void SendByteA(unsigned char aByte);
void SendByteB(unsigned char aByte);
void RF02_INIT(void);
void RF_send_frame(void);
void Delay_7i5(unsigned char uS);
unsigned char ReadStatus(void);
void RF_init(void);
unsigned int RFXX_WRT_CMD(unsigned short aCmd);

extern void parse_frame(void);
extern unsigned char _rx_frame(void);

extern unsigned char rf_send_period;




#ifdef RF_MCU_DELAY
#define RF_TIME_CALIBR                0xC280  //0xC2A0
#else
#define RF_TIME_CALIBR                0xC2A0  //0xC2A0
#endif

#if 0

#define RF_START_SEND_CMD           0xC03A    //0xC03B
#define RF_STOP_SEND_CMD            0xC002    //0xC003

#define RF_TIME_CLEAR               0xC000  //0xC001
#define RF_TIME_SET                 0xC002  //0xC003


#else

#define RF_START_SEND_CMD           0xC039    //0xC03B
#define RF_STOP_SEND_CMD            0xC001    //0xC003

#define RF_TIME_CLEAR               0xC001  //0xC001
#define RF_TIME_SET                 0xC001  //0xC003

#endif


#define SHORT_TERM          6
#define LONG_TERM           60

#ifdef __cplusplus
}
#endif


#endif /* PROTOCOL_H */

⌨️ 快捷键说明

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