X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/2de26056ce3650d8ae48f30bf657e27b3669a0a3..28ae37b74612436cc2e5fee4dbcc3e42cc9aaf03:/armsrc/lfsampling.c diff --git a/armsrc/lfsampling.c b/armsrc/lfsampling.c index e53d0205..e0764063 100644 --- a/armsrc/lfsampling.c +++ b/armsrc/lfsampling.c @@ -39,17 +39,17 @@ void printConfig() * @brief setSamplingConfig * @param sc */ -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->samples_to_skip != -1) config.samples_to_skip = sc->samples_to_skip; +void setSamplingConfig(uint8_t *config_data) { + sample_config *sc = (sample_config *)config_data; + 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->samples_to_skip != -1) config.samples_to_skip = sc->samples_to_skip; config.averaging= sc->averaging; - if(config.bits_per_sample > 8) config.bits_per_sample = 8; - if(config.decimation < 1) config.decimation = 1; + if (config.bits_per_sample > 8) config.bits_per_sample = 8; + if (config.decimation < 1) config.decimation = 1; printConfig(); }