]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/lfsampling.c
CHG:forget the "base"..
[proxmark3-svn] / armsrc / lfsampling.c
index a272e153873e4416e1af5644f21857327a287c4e..02c0cd4a7708fbe60f1378fc0d308887812eb145 100644 (file)
@@ -48,11 +48,11 @@ sample_config* getSamplingConfig() {
        return &config;
 }
 
-typedef struct {
+struct BitstreamOut {
        uint8_t * buffer;
        uint32_t numbits;
        uint32_t position;
-} BitstreamOut;
+};
 
 /**
  * @brief Pushes bit onto the stream
@@ -87,11 +87,10 @@ void LFSetupFPGAForADC(int divisor, bool lf_field) {
 
        // Connect the A/D to the peak-detected low-frequency path.
        SetAdcMuxFor(GPIO_MUXSEL_LOPKD);
-       // Give it a bit of time for the resonant antenna to settle.
+       // 50ms for the resonant antenna to settle.
        SpinDelay(50);
        // Now set up the SSC to get the ADC samples that are now streaming at us.
        FpgaSetupSsc();
-       
        // start a 1.5ticks is 1us
        StartTicks();
 }
@@ -260,7 +259,7 @@ void doT55x7Acquisition(size_t sample_size) {
        while(!BUTTON_PRESS() && !usb_poll_validate_length() && skipCnt < 1000 && (i < bufsize) ) {
                WDT_HIT();              
                if (AT91C_BASE_SSC->SSC_SR & AT91C_SSC_TXRDY) {
-                       AT91C_BASE_SSC->SSC_THR = 0x43;
+                       AT91C_BASE_SSC->SSC_THR = 0x43; //43
                        LED_D_ON();
                }
                if (AT91C_BASE_SSC->SSC_SR & AT91C_SSC_RXRDY) {
@@ -276,7 +275,7 @@ void doT55x7Acquisition(size_t sample_size) {
                                skipCnt++;
                                continue;
                        }
-                       // skip until the first Low sample below threshold
+                       // skip until the first low sample below threshold
                        if (!startFound && curSample < T55xx_READ_LOWER_THRESHOLD) {
                                //if (curSample > lastSample) 
                                lastSample = curSample;
@@ -286,7 +285,6 @@ void doT55x7Acquisition(size_t sample_size) {
                                continue;
                        }
 
-
                        // skip until first high samples begin to change
                        if (startFound || curSample > T55xx_READ_LOWER_THRESHOLD + T55xx_READ_TOL){
                                // if just found start - recover last sample
Impressum, Datenschutz