#include
#include
#define IOCFG2
#define IOCFG1
#define IOCFG0
#define FIFOTHR
#define SYNC1
#define SYNC0
#define PKTLEN
#define PKTCTRL1
#define PKTCTRL0
#define ADDR
#define CHANNR
#define FSCTRL1
#define FSCTRL0
#define FREQ2
#define FREQ1
#define FREQ0
#define MDMCFG4
#define MDMCFG3
#define MDMCFG2
#define MDMCFG1
#define MDMCFG0
#define DEVIATN
#define MCSM2
#define MCSM1
#define MCSM0
#define FOCCFG
#define BSCFG
#define AGCCTRL2
#define AGCCTRL1
#define AGCCTRL0
#define WOREVT1
#define WOREVT0
#define WORCTRL
#define FREND1
#define FREND0
#define FSCAL3
#define FSCAL2
#define FSCAL1
#define FSCAL0
#define RCCTRL1
#define RCCTRL0
#define FSTEST
#define PTEST
#define AGCTEST
#define TEST2
#define TEST1
#define TEST0
#define SRES
#define
#define SXOFF
#define SCAL
#define SRX
#define STX
#define SIDLE
#define SAFC
#define SWOR
#define SPWD
#define SFRX
#define SFTX
#define SWORRST
#define SNOP
#define PARTNUM
#define VERSION
#define FREQEST
#define LQI
#define RSSI
#define MARCSTATE
#define WORTIME1
#define WORTIME0
#define PKTSTATUS
#define VCO_VC_DAC
#define TXBYTES
#define RXBYTES
#define PATABLE
#define TX_FIFO
#define RX_FIFO
#define data_len
typedef
typedef
uchar rx_buffer[data_len]={0,0,0,0,0,0,0,0};//rx data
//uchar RX_data[data_len];
uchar code tx_buffer[data_len]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};//tx data
uchar data_length=0;
uchar code P_Config[]={0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0};//功率配置
sbit CSN=P2^1;
sbit SCLK=P2^7;
sbit SI=P2^2;
sbit SO=P2^0;
sbit GDO0=P2^6;
sbit key=P2^5;
sbit LED=P0^0;
//sbit LED1=P0^6;
void CC1101_Init(void);
void CC1101_RESET(void);
void POWER_UP_RESET(void);
uchar SPI_WR_Byte(uchar value);
void SPI_Write_Byte(uchar addr,uchar value);
uchar SPI_Read_Byte(uchar addr);
void SPI_Write_Strobe(uchar strobe);
void SPI_Write_Burst(uchar addr,uchar *buffer,uchar count);
void SPI_Read_Burst(uchar addr,uchar *buffer,uchar count);
void SPI_Write_Packet(uchar *TX_Buffer,uchar size);
uchar SPI_Read_Packet(uchar *RX_Buffer,uchar length);
void CC1101_Set_TX(void);
void CC1101_Set_RX(void);
void Write_Config(void);
void delay_ms(uint x)
{
}
void delay_us(uint x)
{
}
//------------------------------------------------/
//函数功能:通过SPI写读一字节
//输入参数:value
//输出参数:B_value
//-----------------------------------------------/
uchar SPI_WR_Byte(uchar value)
{
}
//-------------------------------------------------/
//函数功能:重置CC1101
//输入参数:无
//输出参数:无
//----------------------------------------------/
void CC1101_RESET(void)
{
}
//-----------------------------------------------/
//函数功能:CC1101上电重置
//输入参数:无
//输出参数:无
//--------------------------------------------/
void POWER_UP_RESET(void)
{
}[page]
//-----------------------------------------------/
//函数功能:CC1101初始化
//输入参数:无
//输出参数:无
//--------------------------------------------/
void CC1101_Init(void)
{
//
//
//
//
}
//-----------------------------------------------/
//函数功能:SPI写命令
//输入参数:Strobe
//输出参数:无
//---------------------------------------------/
void SPI_Write_Strobe(uchar strobe)
{
}
uchar SPI_Read_Byte(uchar addr)
{
}
void SPI_Write_Byte(uchar addr,uchar value)
{
}
void SPI_Write_Burst(uchar addr,uchar *buffer,uchar count)
{
}
void SPI_Read_Burst(uchar addr,uchar *buffer,uchar count)
{
}
uchar SPI_Read_Status(uchar addr)
{
}
void SPI_Write_Packet(uchar *TX_Buffer,uchar size)
{
//
}
void Write_Config(void)
{
//
//
//
//
//
//
//
//
//
//
//
//
//
}
uchar SPI_Read_Packet(uchar *RX_Buffer,uchar length)
{
}
void main(void)
{
}
上一篇:基于CC1101与STC89C52无线收发程序(接收程序)
下一篇:A7105(2.4G)与STC89C52单片机无线收发程序(接收程序)
推荐阅读最新更新时间:2024-03-16 14:30