一.通讯相关配置
1.设置通讯地址
/*******************点对点通讯地址设置*******************/
#define RF_CHANNEL XX // 频道 11~26
#define PAN_ID 0xXXXX //网络id
#define MY_ADDR 0xXXXX //本机模块地址
#define SEND_ADDR 0xXXXX //发送地址
2.无线RF初始化
/******************无线RF初始化******************/
static basicRfCfg_t basicRfConfig;
void ConfigRf_Init(void)
{
basicRfConfig.panId = PAN_ID;
basicRfConfig.channel = RF_CHANNEL;
basicRfConfig.myAddr = MY_ADDR;
basicRfConfig.ackRequest = TRUE;
while(basicRfInit(&basicRfConfig) == FAILED);
basicRfReceiveOn();
}
二.部分函数说明
来源:CSDN
作者:Lsng
链接:https://blog.csdn.net/qq_41287302/article/details/103937982