📄 wrtrf02.c
字号:
//-变量声明---------------------------------------------------------------------------------
#include <reg52.h>
#include "WRT_CMD.h"
#include "UART_init.h"
#include "GET_CMD.h"
sbit nSEL1=P1^3;
sbit nSEL2=P1^2;
//sbit SEND_flag=P0^0;
//------------------------------------------------------------------------------------------
// name:wrtRF02
//description:designed for Wireless RS232 adapter.setting the "A" board RFM02 frequence command
//input:NON
//output:NON
//designed by KongRui,Version 1.0,2007/05/13
//-------------------------------------------------------------------------------------------
void wrtRF02(unsigned int RF02CSC,RF02FSC,RF02DRC){
// bit SDI,SCK;
nSEL2=0;
nSEL1=1;
// SEND_flag=0;
// SDI=P1^0;
// SCK=P1^1;
WRT_CMD(RF02CSC); //configuration setting command,get the command from the computer
WRT_CMD(RF02FSC); //frequency setting command,get the command from the computer
WRT_CMD(RF02DRC); //data rate command,get the command from the computer
WRT_CMD(0xc038); //send data
// SEND_flag=1;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -