求stm32驱动nrf905程序
我调了有一段时间了 这是我从51程序改过来的 希望高手指正 问题出在哪里#include "NRF905.H"
#include "STM32Lib\\stm32f10x.h"
#include "stm32f10x_spi.h"
#include "SPI.h"
#include "rcc.h"
//---------------------------------------------------发送数据缓冲区-------------------------------------------------
u8 TxRxBuf=
{
0x04,0x02,0x03,0x4,0x05,0x06,0x07,0x08,
0x09,0x10,0x11,0x12,0x13,0x14,0x15,0x16,
0x17,0x18,0x19,0x20,0x21,0x22,0x23,0x24,
0x25,0x26,0x27,0x28,0x29,0x30,0x31,0xff,
};
u8 TxAddress={TX_ADDR_Byte0,TX_ADDR_Byte1,TX_ADDR_Byte2,TX_ADDR_Byte3};
u8 RFConf={0x00,0x4c,0x0c,0x44 ,0x20,0x20, 0xCC,0xCC,0xCC,0xCC,0x58};
u8 RxBuf;
u8 receive;
//uchar tf;
void SpiInit(void)
{
Set_CSN; // Spi disable
}
/*******************************************************************************************/
//function InitIO(); 初始化IO
/*******************************************************************************************/
void nRF905Init(void)
{
SpiInit();
Clr_DR ; // Init DR for input
Clr_AM; // Init AM for input
Clr_CD ; // Init CD for input
Set_PWR_UP_DDR; // nRF905 power on
//SysTickDelay(4); //1毫秒延时
Clr_TRX_CE_DDR; // Set nRF905 in standby mode
Clr_TX_EN_DDR; // set radio in Rx mode
}
void Config905(void)
{
u16 i;
Clr_CSN; // Spi enable for write a spi command
//SPI_SendByte(WC); // Write config command写放配置命令
for (i=0;i
回复:求stm32驱动nrf905程序
好,我先来顶一下!
页:
[1]