Fix 'make style' findings

This commit is contained in:
Christian Zietz 2024-02-02 20:41:37 +01:00
commit 404d0a8c7b
4 changed files with 19 additions and 4 deletions

View file

@ -567,7 +567,6 @@ OUT:
StopTicks(); StopTicks();
} }
void LegicRfSetThreshold(uint32_t threshold) void LegicRfSetThreshold(uint32_t threshold) {
{
input_threshold = threshold; input_threshold = threshold;
} }

View file

@ -765,7 +765,7 @@ static int CmdSetHFThreshold(const char *Cmd) {
params[2] = arg_get_int_def(ctx, 3, 8); params[2] = arg_get_int_def(ctx, 3, 8);
CLIParserFree(ctx); CLIParserFree(ctx);
if ((params[0]<1) || (params[0]>63) || (params[1]<1) || (params[1]>63)) { if ((params[0] < 1) || (params[0] > 63) || (params[1] < 1) || (params[1] > 63)) {
PrintAndLogEx(ERR, "Thresholds must be between " _YELLOW_("1") " and " _YELLOW_("63")); PrintAndLogEx(ERR, "Thresholds must be between " _YELLOW_("1") " and " _YELLOW_("63"));
return PM3_EINVARG; return PM3_EINVARG;
} }
@ -1228,7 +1228,7 @@ static command_t CommandTable[] = {
{"readmem", CmdReadmem, IfPm3Present, "Read from processor flash"}, {"readmem", CmdReadmem, IfPm3Present, "Read from processor flash"},
{"reset", CmdReset, IfPm3Present, "Reset the Proxmark3"}, {"reset", CmdReset, IfPm3Present, "Reset the Proxmark3"},
{"setlfdivisor", CmdSetDivisor, IfPm3Present, "Drive LF antenna at 12MHz / (divisor + 1)"}, {"setlfdivisor", CmdSetDivisor, IfPm3Present, "Drive LF antenna at 12MHz / (divisor + 1)"},
{"sethfthresh", CmdSetHFThreshold,IfPm3Present, "Set thresholds in HF/14a mode"}, {"sethfthresh", CmdSetHFThreshold, IfPm3Present, "Set thresholds in HF/14a mode"},
{"setmux", CmdSetMux, IfPm3Present, "Set the ADC mux to a specific value"}, {"setmux", CmdSetMux, IfPm3Present, "Set the ADC mux to a specific value"},
{"standalone", CmdStandalone, IfPm3Present, "Jump to the standalone mode"}, {"standalone", CmdStandalone, IfPm3Present, "Jump to the standalone mode"},
{"status", CmdStatus, IfPm3Present, "Show runtime status information about the connected Proxmark3"}, {"status", CmdStatus, IfPm3Present, "Show runtime status information about the connected Proxmark3"},

View file

@ -7940,6 +7940,21 @@
], ],
"usage": "hw reset [-h]" "usage": "hw reset [-h]"
}, },
"hw sethfthresh": {
"command": "hw sethfthresh",
"description": "Set thresholds in HF/14a and Legic mode.",
"notes": [
"hw sethfthresh -t 7 -i 20 -l 8"
],
"offline": false,
"options": [
"-h, --help This help",
"-t, --thresh <dec> threshold, used in 14a reader mode (def 7)",
"-i, --high <dec> high threshold, used in 14a sniff mode (def 20)",
"-l, --legic <dec> threshold used in Legic mode (def 8)"
],
"usage": "hw sethfthresh [-h] [-t <dec>] [-i <dec>] [-l <dec>]"
},
"hw setlfdivisor": { "hw setlfdivisor": {
"command": "hw setlfdivisor", "command": "hw setlfdivisor",
"description": "Drive LF antenna at 12 MHz / (divisor + 1).", "description": "Drive LF antenna at 12 MHz / (divisor + 1).",

View file

@ -804,6 +804,7 @@ Check column "offline" for their availability.
|`hw readmem `|N |`Read from processor flash` |`hw readmem `|N |`Read from processor flash`
|`hw reset `|N |`Reset the Proxmark3` |`hw reset `|N |`Reset the Proxmark3`
|`hw setlfdivisor `|N |`Drive LF antenna at 12MHz / (divisor + 1)` |`hw setlfdivisor `|N |`Drive LF antenna at 12MHz / (divisor + 1)`
|`hw sethfthresh `|N |`Set thresholds in HF/14a mode`
|`hw setmux `|N |`Set the ADC mux to a specific value` |`hw setmux `|N |`Set the ADC mux to a specific value`
|`hw standalone `|N |`Jump to the standalone mode` |`hw standalone `|N |`Jump to the standalone mode`
|`hw status `|N |`Show runtime status information about the connected Proxmark3` |`hw status `|N |`Show runtime status information about the connected Proxmark3`