mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-05 23:52:27 +08:00
make style
This commit is contained in:
parent
e4972e8810
commit
517f0886ba
2 changed files with 13 additions and 14 deletions
|
@ -407,8 +407,7 @@ static bool hitag2_password(uint8_t *rx, const size_t rxlen, uint8_t *tx, size_t
|
||||||
bAuthenticating = true;
|
bAuthenticating = true;
|
||||||
memcpy(tx, password, 4);
|
memcpy(tx, password, 4);
|
||||||
*txlen = 32;
|
*txlen = 32;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// stage 2, got config byte+password TAG, discard as will read later
|
// stage 2, got config byte+password TAG, discard as will read later
|
||||||
if (bAuthenticating) {
|
if (bAuthenticating) {
|
||||||
bAuthenticating = false;
|
bAuthenticating = false;
|
||||||
|
|
|
@ -157,7 +157,7 @@ t55xx_configurations_t T55xx_Timing = {
|
||||||
void printT55xxConfig(void) {
|
void printT55xxConfig(void) {
|
||||||
|
|
||||||
#define PRN_NA sprintf(s + strlen(s), _RED_("N/A") "| ");
|
#define PRN_NA sprintf(s + strlen(s), _RED_("N/A") "| ");
|
||||||
|
|
||||||
DbpString(_BLUE_("LF T55XX config"));
|
DbpString(_BLUE_("LF T55XX config"));
|
||||||
Dbprintf(" [r] [a] [b] [c] [d] [e] [f] [g]");
|
Dbprintf(" [r] [a] [b] [c] [d] [e] [f] [g]");
|
||||||
Dbprintf(" mode |start|write|write|write| read|write|write");
|
Dbprintf(" mode |start|write|write|write| read|write|write");
|
||||||
|
@ -168,7 +168,7 @@ void printT55xxConfig(void) {
|
||||||
|
|
||||||
char s[160];
|
char s[160];
|
||||||
memset(s, 0, sizeof(s));
|
memset(s, 0, sizeof(s));
|
||||||
|
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case T55XX_DLMODE_FIXED :
|
case T55XX_DLMODE_FIXED :
|
||||||
sprintf(s, _YELLOW_("fixed bit length") _GREEN_("(default)") "|");
|
sprintf(s, _YELLOW_("fixed bit length") _GREEN_("(default)") "|");
|
||||||
|
@ -185,7 +185,7 @@ void printT55xxConfig(void) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (T55xx_Timing.m[i].start_gap != 0xFFFF)
|
if (T55xx_Timing.m[i].start_gap != 0xFFFF)
|
||||||
sprintf(s + strlen(s), " %3d | ", T55xx_Timing.m[i].start_gap / 8);
|
sprintf(s + strlen(s), " %3d | ", T55xx_Timing.m[i].start_gap / 8);
|
||||||
else
|
else
|
||||||
|
@ -194,33 +194,33 @@ void printT55xxConfig(void) {
|
||||||
if (T55xx_Timing.m[i].write_gap != 0xFFFF)
|
if (T55xx_Timing.m[i].write_gap != 0xFFFF)
|
||||||
sprintf(s + strlen(s), "%3d | ", T55xx_Timing.m[i].write_gap / 8);
|
sprintf(s + strlen(s), "%3d | ", T55xx_Timing.m[i].write_gap / 8);
|
||||||
else
|
else
|
||||||
PRN_NA;
|
PRN_NA;
|
||||||
|
|
||||||
if (T55xx_Timing.m[i].write_0 != 0xFFFF)
|
if (T55xx_Timing.m[i].write_0 != 0xFFFF)
|
||||||
sprintf(s + strlen(s), "%3d | ", T55xx_Timing.m[i].write_0 / 8);
|
sprintf(s + strlen(s), "%3d | ", T55xx_Timing.m[i].write_0 / 8);
|
||||||
else
|
else
|
||||||
PRN_NA;
|
PRN_NA;
|
||||||
|
|
||||||
if (T55xx_Timing.m[i].write_1 != 0xFFFF)
|
if (T55xx_Timing.m[i].write_1 != 0xFFFF)
|
||||||
sprintf(s + strlen(s), "%3d | ", T55xx_Timing.m[i].write_1 / 8);
|
sprintf(s + strlen(s), "%3d | ", T55xx_Timing.m[i].write_1 / 8);
|
||||||
else
|
else
|
||||||
PRN_NA;
|
PRN_NA;
|
||||||
|
|
||||||
if (T55xx_Timing.m[i].read_gap != 0xFFFF)
|
if (T55xx_Timing.m[i].read_gap != 0xFFFF)
|
||||||
sprintf(s + strlen(s), "%3d | ", T55xx_Timing.m[i].read_gap / 8);
|
sprintf(s + strlen(s), "%3d | ", T55xx_Timing.m[i].read_gap / 8);
|
||||||
else
|
else
|
||||||
PRN_NA;
|
PRN_NA;
|
||||||
|
|
||||||
if (T55xx_Timing.m[i].write_2 != 0xFFFF && i == T55XX_DLMODE_1OF4 )
|
if (T55xx_Timing.m[i].write_2 != 0xFFFF && i == T55XX_DLMODE_1OF4)
|
||||||
sprintf(s + strlen(s), "%3d | ", T55xx_Timing.m[i].write_2 / 8);
|
sprintf(s + strlen(s), "%3d | ", T55xx_Timing.m[i].write_2 / 8);
|
||||||
else
|
else
|
||||||
PRN_NA
|
PRN_NA
|
||||||
|
|
||||||
if (T55xx_Timing.m[i].write_3 != 0xFFFF && i == T55XX_DLMODE_1OF4)
|
if (T55xx_Timing.m[i].write_3 != 0xFFFF && i == T55XX_DLMODE_1OF4)
|
||||||
sprintf(s + strlen(s), "%3d | ", T55xx_Timing.m[i].write_3 / 8);
|
sprintf(s + strlen(s), "%3d | ", T55xx_Timing.m[i].write_3 / 8);
|
||||||
else
|
else
|
||||||
PRN_NA;
|
PRN_NA;
|
||||||
|
|
||||||
s[strlen(s)] = 0;
|
s[strlen(s)] = 0;
|
||||||
DbpString(s);
|
DbpString(s);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue