]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
fix compile issue with gcc 9.1.0 (issue #868)
authorpwpiwi <pwpiwi@users.noreply.github.com>
Sat, 21 Sep 2019 12:56:01 +0000 (13:56 +0100)
committerGitHub <noreply@github.com>
Sat, 21 Sep 2019 12:56:01 +0000 (13:56 +0100)
armsrc/appmain.c
armsrc/lfsampling.c
armsrc/lfsampling.h

index 93f32f5fac72a6d29c5b1dd0507ffbc4d33a7f87..c7c716a735847b2bdbc3839436ba01fa5b6509a6 100644 (file)
@@ -998,7 +998,7 @@ void UsbPacketReceived(uint8_t *packet, int len)
        switch(c->cmd) {
 #ifdef WITH_LF
                case CMD_SET_LF_SAMPLING_CONFIG:
-                       setSamplingConfig((sample_config *) c->d.asBytes);
+                       setSamplingConfig(c->d.asBytes);
                        break;
                case CMD_ACQUIRE_RAW_ADC_SAMPLES_125K:
                        cmd_send(CMD_ACK,SampleLF(c->arg[0], c->arg[1]),0,0,0,0);
index e53d02056e057c89aef2d01d04830ad087cd8ea2..e0764063da3d33c078bb854f1b939fe5bd8695ce 100644 (file)
@@ -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();
 }
index ea044f3ca55dbd3841fb134acd9ec24235fafc72..3c0fc93ea7923335f9786e39a5be0e4582f04f36 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef LFSAMPLING_H
-#define LFSAMPLING_H
+#ifndef LFSAMPLING_H__
+#define LFSAMPLING_H__
 
 /**
 * acquisition of Cotag LF signal. Similar to other LF,  since the Cotag has such long datarate RF/384
@@ -45,7 +45,7 @@ uint32_t DoAcquisition_config(bool silent, int sample_size);
 * Setup the FPGA to listen for samples. This method downloads the FPGA bitstream
 * if not already loaded, sets divisor and starts up the antenna.
 * @param divisor : 1, 88> 255 or negative ==> 134.8 KHz
-*                                 0 or 95 ==> 125 KHz
+*                  0 or 95 ==> 125 KHz
 *
 **/
 void LFSetupFPGAForADC(int divisor, bool lf_field);
@@ -61,9 +61,9 @@ void LFSetupFPGAForADC(int divisor, bool lf_field);
  * @brief setSamplingConfig
  * @param sc
  */
-void setSamplingConfig(sample_config *sc);
+void setSamplingConfig(uint8_t *config_data);
 
-sample_config * getSamplingConfig();
+sample_config *getSamplingConfig();
 
 void printConfig();
 
Impressum, Datenschutz