/***************************************************************************
函數名稱:uchar SPI_RW(uchar dat)
函數功能:NRF24L01的SPI時序
函數備注:Writes one byte to nRF24L01, and return the byte read from nRF24L01 during write
***************************************************************************/
uchar SPI_RW(uchar dat)
{
uchar i;
for(i=8;i>0;i--)
{
dat <<= 1;
MOSI = CY;
SCK = 1;
dat |= MISO;
SCK = 0;
}
return(dat);
}
那個CY是什么?為什么不是 dat|0x80 呢? |