X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=firmware%2Fapps%2Fradios%2Fccspi.c;h=df99cedee74229c38348c9bd9de31f063016e051;hp=524052f0fa33450390cdb561b22a12242dffc693;hb=488bacac294141af99fbec482db6ca21b8019a5e;hpb=8811b9e7eb0c09f5b7568abc5cbe8de90104c38d diff --git a/firmware/apps/radios/ccspi.c b/firmware/apps/radios/ccspi.c index 524052f..df99ced 100644 --- a/firmware/apps/radios/ccspi.c +++ b/firmware/apps/radios/ccspi.c @@ -203,7 +203,7 @@ void ccspi_handle_fn( uint8_t const app, SETSS; //Load the jamming packet. - //TODO try to preload this to get faster effects + //Note: attempts to preload this actually slowed the jam time down from 7 to 9 bytes. CLRSS; ccspitrans8(CCSPI_TXFIFO); char pkt[15] = {0x0f, 0x01, 0x08, 0x82, 0xff, 0xff, 0xff, 0xff, 0xde, 0xad, 0xbe, 0xef, 0xba, 0xbe, 0xc0}; @@ -233,12 +233,13 @@ void ccspi_handle_fn( uint8_t const app, txdata(app,NOK,0); #endif - case CCSPI_REFLEX_SEQNUM: + case CCSPI_REFLEX_AUTOACK: #if defined(FIFOP) && defined(SFD) && defined(FIFO) && defined(PLED2DIR) && defined(PLED2PIN) && defined(PLED2OUT) - //char byte[4]; + //txdata(app, verb, 1); + debugstr("AutoACK"); + char byte[4]; while(1) { //Has there been an overflow in the RX buffer? - //TODO do we really need to check this?? if((!FIFO)&&FIFOP){ //debugstr("Clearing overflow"); CLRSS; @@ -252,6 +253,29 @@ void ccspi_handle_fn( uint8_t const app, PLED2DIR |= PLED2PIN; PLED2OUT &= ~PLED2PIN; + //Put radio in TX mode + //Note: Not doing this slows down jamming, so can't jam short packets. + // However, if we do this, it seems to mess up our RXFIFO ability. + //CLRSS; + //ccspitrans8(0x04); + //SETSS; + //Load the jamming packet + CLRSS; + ccspitrans8(CCSPI_TXFIFO); + char pkt[7] = {0x07, 0x01, 0x08, 0xff, 0xff, 0xff, 0xff}; + for(i=0;i> 8) & 0xFF; + + for(i=0;i