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.
29 //Wait for RSSI to settle.
31 //Delay until the RSSI is above the threshold.
32 while(rssi<threshold){
39 while(MARCSTATE!=MARC_STATE_IDLE);
45 //Transmit carrier for 10ms
47 while(MARCSTATE!=MARC_STATE_TX);
50 //Carrier will clear when the loop continue,
51 //but we can HALT to give the host a chance to take over.
54 RFST = RFST_SIDLE; //End transmit.