X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=shellcode%2Fchipcon%2Fcc1110%2Frxpacket.c;h=13ec690865339b06931584e6b1ba3c02666b5e5a;hp=a294aac9e0d2c57eb70480617916cea83040086c;hb=f9fa242f4cd7c7ad6ff7f2a603d77e721595a7ac;hpb=77720e2680a4cda7305339510616cd707df423ba diff --git a/shellcode/chipcon/cc1110/rxpacket.c b/shellcode/chipcon/cc1110/rxpacket.c index a294aac..13ec690 100644 --- a/shellcode/chipcon/cc1110/rxpacket.c +++ b/shellcode/chipcon/cc1110/rxpacket.c @@ -8,35 +8,47 @@ char __xdata at 0xfe00 packet[MAXLEN] ; void main(){ unsigned char len=16, i=0; - //1-out the buffer. - for(i=0;i<64;i++) - packet[i]=0xFF; - i=0; - - //Disable interrupts. - RFTXRXIE=0; - - //idle a bit. - RFST=RFST_SIDLE; - while(MARCSTATE!=MARC_STATE_IDLE); - - //Begin to receive. - RFST=RFST_SRX; - while(MARCSTATE!=MARC_STATE_RX); - - while(i