]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/lfops.c
* Add an option to lf read command to use an arbitrary divisor, enabling reading...
[proxmark3-svn] / armsrc / lfops.c
index 17d293edcd6925b432a56fdb45854dd061e3a3a7..fbd07e65f8705e6fb76d610db9bdc27b40758361 100644 (file)
 #include "crc16.h"
 #include "string.h"
 
-void AcquireRawAdcSamples125k(int at134khz)
+void AcquireRawAdcSamples125k(int divisor)
 {
-       if (at134khz)
+       if ( (divisor == 1) || (divisor < 0) || (divisor > 255) )
                FpgaSendCommand(FPGA_CMD_SET_DIVISOR, 88); //134.8Khz
-       else
+       else if (divisor == 0)
                FpgaSendCommand(FPGA_CMD_SET_DIVISOR, 95); //125Khz
+       else
+               FpgaSendCommand(FPGA_CMD_SET_DIVISOR, divisor);
 
        FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_READER);
 
Impressum, Datenschutz