]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
added 'buffclear' - when you absolutely positivley must clear every bit in the room
authoradam@algroup.co.uk <adam@algroup.co.uk@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Fri, 3 Jul 2009 10:17:52 +0000 (10:17 +0000)
committeradam@algroup.co.uk <adam@algroup.co.uk@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Fri, 3 Jul 2009 10:17:52 +0000 (10:17 +0000)
armsrc/appmain.c
include/usb_cmd.h
winsrc/command.cpp
winsrc/prox.h

index 18b8d64a6b10e1e32fd25c4d71d51d5c492b0121..681bba9993d73d4be1fe76d657ca3d7c57d0be7a 100644 (file)
@@ -27,6 +27,13 @@ BYTE ToSend[256];
 int ToSendMax;\r
 static int ToSendBit;\r
 \r
+
+void BufferClear(void)
+{
+       memset(BigBuf,0,sizeof(BigBuf));
+       DbpString("Buffer cleared");
+}
+
 void ToSendReset(void)\r
 {\r
        ToSendMax = -1;\r
@@ -603,6 +610,10 @@ void UsbPacketReceived(BYTE *packet, int len)
                case CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_15693:\r
                        AcquireRawAdcSamplesIso15693();\r
                        break;\r
+
+               case CMD_BUFF_CLEAR:
+                       BufferClear();
+                       break;
 \r
                case CMD_READER_ISO_15693:\r
                        ReaderIso15693(c->ext1);\r
index 655f194cd2ae191067bcf699f0dbdc5344972ac0..78b484258a0a47474392045df9ae7df855aacc66 100644 (file)
@@ -33,6 +33,7 @@ typedef struct {
 #define CMD_DEBUG_PRINT_BYTES                                          0x0102\r
 #define CMD_LCD_RESET                                                          0x0103\r
 #define CMD_LCD                                                                                0x0104\r
+#define CMD_BUFF_CLEAR                                                 0x0105
 \r
 // For low-frequency tags\r
 #define CMD_ACQUIRE_RAW_BITS_TI_TYPE                           0x0200\r
index 8da91f528f8addc5aafe7993d32d82e3f0a206d9..8a7fd6fbb9a28fef4feef68a90103ecc72e78d4a 100644 (file)
@@ -52,6 +52,13 @@ static void CmdReset(char *str)
        SendCommand(&c, FALSE);\r
 }\r
 \r
+static void CmdBuffClear(char *str)\r
+{\r
+       UsbCommand c;\r
+       c.cmd = CMD_BUFF_CLEAR;\r
+       SendCommand(&c, FALSE);\r
+       CmdClearGraph(TRUE);\r
+}\r
 \r
 static void CmdQuit(char *str)\r
 {\r
@@ -2396,6 +2403,7 @@ static struct {
        "autocorr",                     CmdAutoCorr,1,          "<window length> -- Autocorrelation over window",\r
        "bitsamples",           CmdBitsamples,0,        "    Get raw samples as bitstring",\r
        "bitstream",            Cmdbitstream,1,         "[clock rate] -- Convert waveform into a bitstream",\r
+       "buffclear",            CmdBuffClear,0,         "    Clear sample buffer and graph window",\r
        "dec",                          CmdDec,1,               "    Decimate samples",\r
        "detectclock",          Cmddetectclockrate,1, "    Detect clock rate",\r
        "em410xsim",            CmdEM410xsim,1,         "<UID> -- Simulate EM410x tag",\r
index 232aba1f51c0da235f869b54cb4626db62a13d45..e93975de4a1f4dda0dd310c2d12f73b242b61f92 100644 (file)
@@ -22,6 +22,7 @@ extern int CommandFinished;
 extern int offline;\r
 \r
 // command.cpp\r
+static void CmdBuffClear(char *str);\r
 static void GetFromBigBuf(BYTE *dest, int bytes);\r
 static void CmdReset(char *str);\r
 static void CmdQuit(char *str);\r
Impressum, Datenschutz