|
SPI_RW_Reg(WRITE_REG+STATUS,0XFF); //清除状态寄存器 SPI_Write_Buf(WR_TX_PLOAD, TxBuf, TX_PLOAD_WIDTH); //装载数据 lcd_dis( 0,0,"NRF-STATUS:"); //显示 NRF-STATUS值,14 lcd_dis( 0,12,uchartostr( SPI_Read(STATUS) ) ); lcd_dis( 1,0,"FIFO_STATUS:"); //显示FIFO_STATUS ,1之后一直是17 lcd_dis( 1,12,uchartostr( SPI_Read(FIFO_STATUS) ) ); nRF24L01_TxPacket(TxBuf); // Transmit Tx buffer data lcd_dis( 0,0,"NRF-STATUS:"); lcd_dis( 0,14,uchartostr( SPI_Read(STATUS) ) ); //显示STATUS ,17 lcd_dis( 1,14,uchartostr( SPI_Read(FIFO_STATUS) ) ); //显示FIFO_STATUS 17 这是测试发射时的设置 SPI_RW_Reg(WRITE_REG + EN_AA, 0x00); // 频道0自动 ACK应答允许 SPI_RW_Reg(WRITE_REG + SETUP_RETR, 0x00); //禁止自动重发 SPI_RW_Reg(WRITE_REG + EN_RXADDR, 0x00); // 允许接收地址只有频道0 反正不知道为什么不对,求大神指教1 |
|