X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/aaa1a9a2dcb8b9f2b6acd937f84464daa50ecad6..42c235e7efdac01da7e7ef3e4e442557fe50198d:/armsrc/hfsnoop.c diff --git a/armsrc/hfsnoop.c b/armsrc/hfsnoop.c index 945809ce..4af8522a 100644 --- a/armsrc/hfsnoop.c +++ b/armsrc/hfsnoop.c @@ -19,7 +19,7 @@ static void RAMFUNC optimizedSnoop(void) if(AT91C_BASE_SSC->SSC_SR & AT91C_SSC_RXRDY) { *dest = (uint16_t)(AT91C_BASE_SSC->SSC_RHR); - dest = dest + 1; + ++dest; } } //Resetting Frame mode (First set in fpgaloader.c) @@ -54,6 +54,7 @@ void HfSnoop(int samplesToSkip, int triggersToSkip) r = MAX(r & 0xff, r >> 8); if (r >= 240) { + if (++trigger_cnt > triggersToSkip) { break; } @@ -64,9 +65,9 @@ void HfSnoop(int samplesToSkip, int triggersToSkip) if(!BUTTON_PRESS()) { int waitcount = samplesToSkip; // lets wait 40000 ticks of pck0 while(waitcount != 0) { - if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) { - waitcount--; - } + + if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) + --waitcount; } optimizedSnoop(); Dbprintf("Trigger kicked! Value: %d, Dumping Samples Hispeed now.", r);