]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/lfsampling.c
ADD: Marshmellows fixes for "lf t55xx" and "lf cmdread" ref: https://github.com...
[proxmark3-svn] / armsrc / lfsampling.c
index 7d55fa3cfae938b11edf054422ff461cd6f74869..8a6e6b052f72c04d2d4fa9f782fe435ceb6172e6 100644 (file)
@@ -10,7 +10,7 @@
 #include "apps.h"
 #include "util.h"
 #include "string.h"
-
+#include "usb_cdc.h" // for usb_poll_validate_length
 #include "lfsampling.h"
 
 sample_config config = { 1, 8, 1, 95, 0 } ;
@@ -40,11 +40,11 @@ void printConfig()
 void setSamplingConfig(sample_config *sc)
 {
        if(sc->divisor != 0) config.divisor = sc->divisor;
-       if(sc->bits_per_sample!= 0) config.bits_per_sample= sc->bits_per_sample;
-       if(sc->decimation!= 0) config.decimation= sc->decimation;
-       if(sc->trigger_threshold != -1) config.trigger_threshold= sc->trigger_threshold;
+       if(sc->bits_per_sample != 0) config.bits_per_sample = sc->bits_per_sample;
+       if(sc->decimation != 0) config.decimation = sc->decimation;
+       if(sc->trigger_threshold != -1) config.trigger_threshold = sc->trigger_threshold;
 
-       config.averaging= sc->averaging;
+       config.averaging = sc->averaging;
        if(config.bits_per_sample > 8)  config.bits_per_sample = 8;
        if(config.decimation < 1)       config.decimation = 1;
 
@@ -103,7 +103,6 @@ void LFSetupFPGAForADC(int divisor, bool lf_field)
        FpgaSetupSsc();
 }
 
-
 /**
  * Does the sample acquisition. If threshold is specified, the actual sampling
  * is not commenced until the threshold has been reached.
@@ -125,7 +124,7 @@ uint32_t DoAcquisition(uint8_t decimation, uint32_t bits_per_sample, bool averag
        uint8_t *dest = BigBuf_get_addr();
     uint16_t bufsize = BigBuf_max_traceLen();
 
-       BigBuf_Clear_ext(false);
+       //BigBuf_Clear_ext(false);        //creates issues with cmdread (marshmellow)
 
        if(bits_per_sample < 1) bits_per_sample = 1;
        if(bits_per_sample > 8) bits_per_sample = 8;
Impressum, Datenschutz