X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=shellcode%2Fchipcon%2Fcc1110%2Frxpacket.c;h=5ba32a570d5274cf7380c67d284d17112bfd7167;hp=a294aac9e0d2c57eb70480617916cea83040086c;hb=760a463e7f47c3fa5b7c0c92d532562b04289b9a;hpb=1beb021ea684138082d1eadbfd30e0c404444203 diff --git a/shellcode/chipcon/cc1110/rxpacket.c b/shellcode/chipcon/cc1110/rxpacket.c index a294aac..5ba32a5 100644 --- a/shellcode/chipcon/cc1110/rxpacket.c +++ b/shellcode/chipcon/cc1110/rxpacket.c @@ -17,8 +17,8 @@ void main(){ RFTXRXIE=0; //idle a bit. - RFST=RFST_SIDLE; - while(MARCSTATE!=MARC_STATE_IDLE); + //RFST=RFST_SIDLE; + //while(MARCSTATE!=MARC_STATE_IDLE); //Begin to receive. RFST=RFST_SRX; @@ -28,13 +28,9 @@ void main(){ while(!RFTXRXIF); //Wait for byte to be ready. RFTXRXIF=0; //Clear the flag. - if (MARCSTATE == MARC_STATE_RX) { - packet[i]=RFD; //Grab the next byte. - i++; - len=packet[0]; //First byte of the packet is the length. - }else - HALT; - + packet[i]=RFD; //Grab the next byte. + i++; + len=packet[0]; //First byte of the packet is the length. } RFST = RFST_SIDLE; //End receive. HALT;