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 //! Reflexively jam on the present channel by responding to a signal with a carrier wave.
15 unsigned char threshold=packet[0], i=0, rssi=0;;
23 //while(MARCSTATE!=MARC_STATE_IDLE);
26 //Wait for the transmission.
28 while(MARCSTATE!=MARC_STATE_RX);
30 //Wait for RSSI to settle.
32 //Delay until the RSSI is above the threshold.
33 while(rssi<threshold){
40 while(MARCSTATE!=MARC_STATE_IDLE);
46 //Transmit carrier for 10ms
48 while(MARCSTATE!=MARC_STATE_TX);
51 //Carrier will clear when the loop continue,
52 //but we can HALT to give the host a chance to take over.
55 RFST = RFST_SIDLE; //End transmit.