]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdmain.c
CHG: the device-side code for "hf 14a sim x"
[proxmark3-svn] / client / cmdmain.c
index b6517caa560f86de895f7b5ca5c8e3580136711c..b0d3d2a04e8da46d29b6f037e2302cc6740f521d 100644 (file)
@@ -25,6 +25,7 @@
 #include "cmdmain.h"
 #include "util.h"
 #include "cmdscript.h"
+#include "cmdcrc.h"
 
 
 unsigned int current_command = CMD_UNKNOWN;
@@ -42,15 +43,16 @@ static int cmd_tail;//Starts as 0
 
 static command_t CommandTable[] = 
 {
-  {"help",  CmdHelp,  1, "This help. Use '<command> help' for details of a particular command."},
-  {"data",  CmdData,  1, "{ Plot window / data buffer manipulation... }"},
-  {"hf",       CmdHF,          1, "{ High Frequency commands... }"},
-  {"hw",    CmdHW,    1, "{ Hardware commands... }"},
-  {"lf",       CmdLF,          1, "{ Low Frequency commands... }"},
-  {"script", CmdScript,   1,"{ Scripting commands }"},
-  {"quit",  CmdQuit,  1, "Exit program"},
-  {"exit",  CmdQuit,  1, "Exit program"},
-  {NULL, NULL, 0, NULL}
+       {"help",        CmdHelp,        1, "This help. Use '<command> help' for details of a particular command."},
+       {"crc",         CmdCrc,         1, "Crc calculations from the software reveng1-30"},
+       {"data",        CmdData,        1, "{ Plot window / data buffer manipulation... }"},
+       {"hf",          CmdHF,          1, "{ High Frequency commands... }"},
+       {"hw",          CmdHW,          1, "{ Hardware commands... }"},
+       {"lf",          CmdLF,          1, "{ Low Frequency commands... }"},
+       {"script",      CmdScript,      1, "{ Scripting commands }"},
+       {"quit",        CmdQuit,        1, "Exit program"},
+       {"exit",        CmdQuit,        1, "Exit program"},
+       {NULL, NULL, 0, NULL}
 };
 
 command_t* getTopLevelCommandTable()
@@ -132,9 +134,11 @@ int getCommand(UsbCommand* response)
 bool WaitForResponseTimeout(uint32_t cmd, UsbCommand* response, size_t ms_timeout) {
   
   UsbCommand resp;
+       
        if (response == NULL)
     response = &resp;
 
+
   // Wait until the command is received
   for(size_t dm_seconds=0; dm_seconds < ms_timeout/10; dm_seconds++) {
 
@@ -186,7 +190,6 @@ void UsbCommandReceived(UsbCommand *UC)
                } break;
 
                case CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K: {
-                       sample_buf_len += UC->arg[1];
                        memcpy(sample_buf+(UC->arg[0]),UC->d.asBytes,UC->arg[1]);
                } break;
 
Impressum, Datenschutz