2 #include "cc1110-ext.h"
5 char __xdata at 0xfe00 packet[MAXLEN] ;
7 //! Receives a packet out of the radio from 0xFE00.
9 unsigned char len=16, i=0;
22 while(MARCSTATE!=MARC_STATE_IDLE);
26 while(MARCSTATE!=MARC_STATE_RX);
31 while(!RFTXRXIF); //Wait for byte to be ready.
32 RFTXRXIF=0; //Clear the flag.
34 packet[i++]=RFD; //Grab the next byte.
37 RFST = RFST_SIDLE; //End receive.
39 //This while loop can be used for filtering. Unused for now.
40 }while(0);//packet[1]!=(char) 0xdd || packet[2]!=(char) 0x55);