X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/aaa1a9a2dcb8b9f2b6acd937f84464daa50ecad6..711ae19fca5bce2bf76817139e0c371d22e0d452:/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);