这是nRF9E5的初始化的一些程序。如下:
unsigned char SpiReadWrite(unsigned char b) { EXIF &= ~0x20; // Clear SPI interrupt SPI_DATA = b; // Move byte to send to SPI data register while((EXIF & 0x20) == 0x00) // Wait until SPI hs finished transmitting ; return SPI_DATA; }
void Init(void) { unsigned char tmp;
//SPI 设置 SPICLK = 0; // Max SPI clock SPI_CTRL = 0x02; // Connect intewrnal SPI controller to Radio
// Configure Radio: RACSN = 0; SpiReadWrite(WRC | 0x03); // Write to RF config Rx_deepess 3 (RX payload)}、 SpiReadWrite(0x01); // One byte RX payload SpiReadWrite(0x01); // One byte TX payload RACSN = 1;}
请问一下SpiReadWrite(WRC | 0x03); 什么意思啊?
WRC不是写RF配置寄存器嘛?与0x03或一下代表什么呢?请赐教!谢谢!
|