]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/lfops.c
Client cleanup and restructuring. Stage 1...
[proxmark3-svn] / armsrc / lfops.c
index c94490892430c89703b7f95f1879d064520fbc17..a7e1f1df160f7adbce283ce510f55d98f6d1f106 100644 (file)
@@ -7,9 +7,7 @@
 #include <proxmark3.h>\r
 #include "apps.h"\r
 #include "hitag2.h"\r
-#include "../common/crc16.c"\r
-\r
-int sprintf(char *dest, const char *fmt, ...);\r
+#include "crc16.h"\r
 \r
 void AcquireRawAdcSamples125k(BOOL at134khz)\r
 {\r
@@ -425,7 +423,7 @@ void WriteTItag(DWORD idhi, DWORD idlo, WORD crc)
        DbpString("Now use tiread to check");\r
 }\r
 \r
-void SimulateTagLowFrequency(int period, int ledcontrol)\r
+void SimulateTagLowFrequency(int period, int gap, int ledcontrol)\r
 {\r
        int i;\r
        BYTE *tab = (BYTE *)BigBuf;\r
@@ -470,7 +468,13 @@ void SimulateTagLowFrequency(int period, int ledcontrol)
                }\r
 \r
                i++;\r
-               if(i == period) i = 0;\r
+               if(i == period) {\r
+                       i = 0;\r
+                       if (gap) { \r
+                               SHORT_COIL();\r
+                               SpinDelayUs(gap);\r
+                       }\r
+               }\r
        }\r
 }\r
 \r
@@ -764,7 +768,7 @@ void CmdHIDsimTAG(int hi, int lo, int ledcontrol)
 \r
        if (ledcontrol)\r
                LED_A_ON();\r
-       SimulateTagLowFrequency(n, ledcontrol);\r
+       SimulateTagLowFrequency(n, 0, ledcontrol);\r
 \r
        if (ledcontrol)\r
                LED_A_OFF();\r
Impressum, Datenschutz