mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-02-24 15:44:47 +08:00
added 'buffclear' - when you absolutely positivley must clear every bit in the room
This commit is contained in:
parent
93f36463fb
commit
f23e056d95
4 changed files with 21 additions and 0 deletions
|
@ -27,6 +27,13 @@ BYTE ToSend[256];
|
||||||
int ToSendMax;
|
int ToSendMax;
|
||||||
static int ToSendBit;
|
static int ToSendBit;
|
||||||
|
|
||||||
|
|
||||||
|
void BufferClear(void)
|
||||||
|
{
|
||||||
|
memset(BigBuf,0,sizeof(BigBuf));
|
||||||
|
DbpString("Buffer cleared");
|
||||||
|
}
|
||||||
|
|
||||||
void ToSendReset(void)
|
void ToSendReset(void)
|
||||||
{
|
{
|
||||||
ToSendMax = -1;
|
ToSendMax = -1;
|
||||||
|
@ -603,6 +610,10 @@ void UsbPacketReceived(BYTE *packet, int len)
|
||||||
case CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_15693:
|
case CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_15693:
|
||||||
AcquireRawAdcSamplesIso15693();
|
AcquireRawAdcSamplesIso15693();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CMD_BUFF_CLEAR:
|
||||||
|
BufferClear();
|
||||||
|
break;
|
||||||
|
|
||||||
case CMD_READER_ISO_15693:
|
case CMD_READER_ISO_15693:
|
||||||
ReaderIso15693(c->ext1);
|
ReaderIso15693(c->ext1);
|
||||||
|
|
|
@ -33,6 +33,7 @@ typedef struct {
|
||||||
#define CMD_DEBUG_PRINT_BYTES 0x0102
|
#define CMD_DEBUG_PRINT_BYTES 0x0102
|
||||||
#define CMD_LCD_RESET 0x0103
|
#define CMD_LCD_RESET 0x0103
|
||||||
#define CMD_LCD 0x0104
|
#define CMD_LCD 0x0104
|
||||||
|
#define CMD_BUFF_CLEAR 0x0105
|
||||||
|
|
||||||
// For low-frequency tags
|
// For low-frequency tags
|
||||||
#define CMD_ACQUIRE_RAW_BITS_TI_TYPE 0x0200
|
#define CMD_ACQUIRE_RAW_BITS_TI_TYPE 0x0200
|
||||||
|
|
|
@ -52,6 +52,13 @@ static void CmdReset(char *str)
|
||||||
SendCommand(&c, FALSE);
|
SendCommand(&c, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void CmdBuffClear(char *str)
|
||||||
|
{
|
||||||
|
UsbCommand c;
|
||||||
|
c.cmd = CMD_BUFF_CLEAR;
|
||||||
|
SendCommand(&c, FALSE);
|
||||||
|
CmdClearGraph(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
static void CmdQuit(char *str)
|
static void CmdQuit(char *str)
|
||||||
{
|
{
|
||||||
|
@ -2396,6 +2403,7 @@ static struct {
|
||||||
"autocorr", CmdAutoCorr,1, "<window length> -- Autocorrelation over window",
|
"autocorr", CmdAutoCorr,1, "<window length> -- Autocorrelation over window",
|
||||||
"bitsamples", CmdBitsamples,0, " Get raw samples as bitstring",
|
"bitsamples", CmdBitsamples,0, " Get raw samples as bitstring",
|
||||||
"bitstream", Cmdbitstream,1, "[clock rate] -- Convert waveform into a bitstream",
|
"bitstream", Cmdbitstream,1, "[clock rate] -- Convert waveform into a bitstream",
|
||||||
|
"buffclear", CmdBuffClear,0, " Clear sample buffer and graph window",
|
||||||
"dec", CmdDec,1, " Decimate samples",
|
"dec", CmdDec,1, " Decimate samples",
|
||||||
"detectclock", Cmddetectclockrate,1, " Detect clock rate",
|
"detectclock", Cmddetectclockrate,1, " Detect clock rate",
|
||||||
"em410xsim", CmdEM410xsim,1, "<UID> -- Simulate EM410x tag",
|
"em410xsim", CmdEM410xsim,1, "<UID> -- Simulate EM410x tag",
|
||||||
|
|
|
@ -22,6 +22,7 @@ extern int CommandFinished;
|
||||||
extern int offline;
|
extern int offline;
|
||||||
|
|
||||||
// command.cpp
|
// command.cpp
|
||||||
|
static void CmdBuffClear(char *str);
|
||||||
static void GetFromBigBuf(BYTE *dest, int bytes);
|
static void GetFromBigBuf(BYTE *dest, int bytes);
|
||||||
static void CmdReset(char *str);
|
static void CmdReset(char *str);
|
||||||
static void CmdQuit(char *str);
|
static void CmdQuit(char *str);
|
||||||
|
|
Loading…
Reference in a new issue