2 #include "cc1110-ext.h"
4 char __xdata at 0xfe00 packet[256] ;
7 //! Receives a packet out of the radio from 0xFE00.
9 unsigned char len=100, i=0;
10 RFST=RFST_SRX; //Begin to receive.
12 while(RFTXRXIF); //Wait for byte to be ready.
14 RFTXRXIF=0; //Clear the flag.
15 packet[i++]=RFD; //Grab the next byte.
16 len=packet[0]; //First byte of the packet is the length.
18 RFST = RFST_SIDLE; //End transmit.