2 #include "cc1110-ext.h"
4 char __xdata at 0xfe00 packet[256] ;
6 void sleepMillis(int ms) {
9 for (j=0; j<1200;j++); // about 1 millisecond
13 //! Wait for a packet to come, then immediately return.
20 while(MARCSTATE!=MARC_STATE_IDLE);
24 while(MARCSTATE!=MARC_STATE_RX);
26 //Incoming! Return to let the jammer handle things.
30 //! Reflexively jam on the present channel by responding to a signal with a carrier wave.
32 unsigned char threshold=packet[0], i=0, rssi=0;;
40 //while(MARCSTATE!=MARC_STATE_IDLE);
48 while(MARCSTATE!=MARC_STATE_IDLE);
53 //Transmit carrier for 10ms
55 while(MARCSTATE!=MARC_STATE_TX);
58 //Carrier will clear when the loop continue,
59 //but we can HALT to give the host a chance to take over.
62 RFST = RFST_SIDLE; //End transmit.