mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-11 10:38:39 +08:00
add new command "hw break" - to break out softwarewise from loops
This commit is contained in:
parent
7df6be9abd
commit
e425fba4aa
1 changed files with 21 additions and 0 deletions
|
@ -851,9 +851,30 @@ static int CmdConnect(const char *Cmd) {
|
|||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
static int CmdBreak(const char *Cmd) {
|
||||
|
||||
CLIParserContext *ctx;
|
||||
CLIParserInit(&ctx, "hw break",
|
||||
"send break loop package",
|
||||
"hw break\n"
|
||||
);
|
||||
|
||||
void *argtable[] = {
|
||||
arg_param_begin,
|
||||
arg_param_end
|
||||
};
|
||||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||
CLIParserFree(ctx);
|
||||
clearCommandBuffer();
|
||||
SendCommandNG(CMD_BREAK_LOOP, NULL, 0);
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
static command_t CommandTable[] = {
|
||||
{"-------------", CmdHelp, AlwaysAvailable, "----------------------- " _CYAN_("Hardware") " -----------------------"},
|
||||
{"help", CmdHelp, AlwaysAvailable, "This help"},
|
||||
{"break", CmdBreak, IfPm3Present, "Send break loop usb command"},
|
||||
{"connect", CmdConnect, AlwaysAvailable, "Connect Proxmark3 to serial port"},
|
||||
{"dbg", CmdDbg, IfPm3Present, "Set Proxmark3 debug level"},
|
||||
{"detectreader", CmdDetectReader, IfPm3Present, "Detect external reader field"},
|
||||
|
|
Loading…
Reference in a new issue