mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
hw setdivisor - now uses cliparser
This commit is contained in:
parent
667dd1fb83
commit
be92990c45
2 changed files with 15 additions and 8 deletions
|
@ -535,7 +535,21 @@ static int CmdReset(const char *Cmd) {
|
||||||
* 600kHz.
|
* 600kHz.
|
||||||
*/
|
*/
|
||||||
static int CmdSetDivisor(const char *Cmd) {
|
static int CmdSetDivisor(const char *Cmd) {
|
||||||
uint8_t arg = param_get8ex(Cmd, 0, 95, 10);
|
|
||||||
|
CLIParserContext *ctx;
|
||||||
|
CLIParserInit(&ctx, "hw setdivisor",
|
||||||
|
"Drive LF antenna at 12 MHz / (divisor + 1).",
|
||||||
|
"hw setdivisor -d 88"
|
||||||
|
);
|
||||||
|
|
||||||
|
void *argtable[] = {
|
||||||
|
arg_param_begin,
|
||||||
|
arg_u64_1("d", "div", "<dec>", "19 - 255 divisor value (def 95)"),
|
||||||
|
arg_param_end
|
||||||
|
};
|
||||||
|
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||||
|
uint8_t arg = arg_get_u32_def(ctx, 1, 95);
|
||||||
|
CLIParserFree(ctx);
|
||||||
|
|
||||||
if (arg < 19) {
|
if (arg < 19) {
|
||||||
PrintAndLogEx(ERR, "divisor must be between" _YELLOW_("19") " and " _YELLOW_("255"));
|
PrintAndLogEx(ERR, "divisor must be between" _YELLOW_("19") " and " _YELLOW_("255"));
|
||||||
|
|
|
@ -104,14 +104,7 @@ hf mf gen3freeze
|
||||||
hf mf ice
|
hf mf ice
|
||||||
hf mfdes getuid
|
hf mfdes getuid
|
||||||
hw connect
|
hw connect
|
||||||
hw dbg
|
|
||||||
hw detectreader
|
|
||||||
hw fpgaoff
|
|
||||||
hw lcd
|
|
||||||
hw lcdreset
|
|
||||||
hw ping
|
hw ping
|
||||||
hw readmem
|
|
||||||
hw reset
|
|
||||||
hw setlfdivisor
|
hw setlfdivisor
|
||||||
hw setmux
|
hw setmux
|
||||||
hw standalone
|
hw standalone
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue