]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdlfhitag.c
USB comms: part 4 towards @micolous PR #463
[proxmark3-svn] / client / cmdlfhitag.c
index 73c02a1409a41b0526b9fbef9bc02bfe35c8fb1e..0fd8801b8e83010068e818e096361dafcdb4f58d 100644 (file)
@@ -8,11 +8,12 @@
 // Low frequency Hitag support
 //-----------------------------------------------------------------------------
 
+#include "cmdlfhitag.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include "data.h"
-#include "proxmark3.h"
+#include "comms.h"
 #include "ui.h"
 #include "cmdparser.h"
 #include "common.h"
@@ -34,8 +35,7 @@ int CmdLFHitagList(const char *Cmd)
 
        // Query for the actual size of the trace
        UsbCommand response;
-       GetFromBigBuf(got, USB_CMD_DATA_SIZE, 0);
-       WaitForResponse(CMD_ACK, &response);
+       GetFromBigBuf(got, USB_CMD_DATA_SIZE, 0, &response, -1, false);
        uint16_t traceLen = response.arg[2];
        if (traceLen > USB_CMD_DATA_SIZE) {
                uint8_t *p = realloc(got, traceLen);
@@ -45,8 +45,7 @@ int CmdLFHitagList(const char *Cmd)
                        return 2;
                }
                got = p;
-               GetFromBigBuf(got, traceLen, 0);
-               WaitForResponse(CMD_ACK,NULL);
+               GetFromBigBuf(got, traceLen, 0, NULL, -1, false);
        }
        
        PrintAndLog("recorded activity (TraceLen = %d bytes):");
Impressum, Datenschutz