while(i!=len+1){
while(!RFTXRXIF); //Wait for byte to be ready.
RFTXRXIF=0; //Clear the flag.
RFD=packet[i++]; //Send the next byte.
}
while(i!=len+1){
while(!RFTXRXIF); //Wait for byte to be ready.
RFTXRXIF=0; //Clear the flag.
RFD=packet[i++]; //Send the next byte.
}