📄 24e1.h
字号:
#include <reg24e1.h>
/* S1-S4
sbit S1 = P0^3;
sbit S2 = P0^0;
sbit S3 = P1^1;
sbit S4 = P1^0;
extern unsigned char bdata KeyByte;
*/
typedef struct
{
unsigned char n;
unsigned char buf[13];
}RFConfig;
extern RFConfig code tconf,rconf;
extern unsigned char tconfbuf[2],rconfbuf[2];
#define TNUM 14 //发送的数据6字节:前置码(0x55)
#define RNUM 14 //接收的数据6字节:前置码(0x5a)+4字节卡号+1字节校验字节。
extern unsigned char TxBuf[TNUM];
extern unsigned char RxBuf[RNUM];
extern unsigned char TRCOUNT;
#define ADDR_INDEX 8 // Index to address bytes in RFConfig.buf
#define ADDR_COUNT 4 // Number of address bytes
void Transmitter(unsigned char txbuf[]);
void Receiver(unsigned char *rxbuf);
void Init_Receiver(void);
void PutChar(char c);
//对nRF2401子系统进行数据读写操作
unsigned char SpiReadWrite(unsigned char b);
void Delayms(volatile unsigned char n);
void Delay100us(volatile unsigned char n);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -