2 #include "cc1110-ext.h"
4 char __xdata at 0xfe00 packet[256] ;
6 //! Receives a packet out of the radio from 0xFE00.
8 unsigned char len=16, i=0;
20 while(MARCSTATE!=MARC_STATE_IDLE);
24 while(MARCSTATE!=MARC_STATE_RX);
27 while(!RFTXRXIF); //Wait for byte to be ready.
28 RFTXRXIF=0; //Clear the flag.
30 if (MARCSTATE == MARC_STATE_RX) {
31 packet[i]=RFD; //Grab the next byte.
32 //packet[i]=MARCSTATE;
35 //len=packet[0]; //First byte of the packet is the length.
40 RFST = RFST_SIDLE; //End transmit.