if (DATA7) //总是发送最高位 { DATA = 1; } else { DATA = 0; } CLK1 = 1; DATA_BUF = DATA_BUF << 1; CLK1 = 0; }
}
/* <RF2401配置寄存器的写入方式>
NOTE.
On the falling edge of CS, the nRF2401A updates the number of bits actually shifted
in during the last configuration.
Ex:
If the nRF2401A is to be configured for 2 channel RX in ShockBurst., a total of 120
bits must be shifted in during the first configuration after VDD is applied.
Once the wanted protocol, modus and RF channel are set, only one bit (RXEN) is
shifted in to switch between RX and TX.
*/
void Config2401(void)
{ unsigned int i = 0; unsigned char variablel;