Skip to content

Commit

Permalink
make style updates
Browse files Browse the repository at this point in the history
  • Loading branch information
henrygab committed Feb 18, 2023
1 parent 2294549 commit c531bd0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
16 changes: 8 additions & 8 deletions common_arm/flashmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void FlashmemSetSpiBaudrate(uint32_t baudrate) {
}

// read ID out
bool Flash_ReadID_90(flash_device_type_90_t* result) {
bool Flash_ReadID_90(flash_device_type_90_t *result) {

if (Flash_CheckBusy(BUSY_TIMEOUT)) return false;

Expand Down Expand Up @@ -354,20 +354,20 @@ void Flashmem_print_status(void) {
DbpString(" Memory size............. " _GREEN_("2 mbits / 256 kb"));
} else {
Dbprintf(" Device ID............... " _YELLOW_("%02X / %02X (unknown)"),
device_type.manufacturer_id, device_type.device_id );
device_type.manufacturer_id, device_type.device_id);
}
}

uint8_t uid[8] = {0, 0, 0, 0, 0, 0, 0, 0};
Flash_UniqueID(uid);
Dbprintf(" Unique ID (be).......... " _YELLOW_("0x%02X%02X%02X%02X%02X%02X%02X%02X" ),
uid[0], uid[1], uid[2], uid[3],
uid[4], uid[5], uid[6], uid[7]
Dbprintf(" Unique ID (be).......... " _YELLOW_("0x%02X%02X%02X%02X%02X%02X%02X%02X"),
uid[0], uid[1], uid[2], uid[3],
uid[4], uid[5], uid[6], uid[7]
);
if (g_dbglevel > 3) {
Dbprintf(" Unique ID (le).......... " _YELLOW_("0x%02X%02X%02X%02X%02X%02X%02X%02X" ),
uid[7], uid[6], uid[5], uid[4],
uid[3], uid[2], uid[1], uid[0]
Dbprintf(" Unique ID (le).......... " _YELLOW_("0x%02X%02X%02X%02X%02X%02X%02X%02X"),
uid[7], uid[6], uid[5], uid[4],
uid[3], uid[2], uid[1], uid[0]
);
}
FlashStop();
Expand Down
2 changes: 1 addition & 1 deletion common_arm/flashmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ typedef struct {
uint8_t manufacturer_id;
uint8_t device_id;
} flash_device_type_90_t; // to differentiate from JDEC ID via cmd 9F
bool Flash_ReadID_90(flash_device_type_90_t* result);
bool Flash_ReadID_90(flash_device_type_90_t *result);

uint16_t Flash_ReadData(uint32_t address, uint8_t *out, uint16_t len);
uint16_t Flash_ReadDataCont(uint32_t address, uint8_t *out, uint16_t len);
Expand Down
4 changes: 2 additions & 2 deletions common_arm/usb_cdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,8 @@ void usb_update_serial(uint64_t newSerialNumber) {
uint8_t nibble2 = (newSerialNumber >> ((8 * i) + 0)) & 0xFu; // bitmasks [0x0F, 0x0F00, 0x0F0000, ... 0x0F00000000000000]
char c1 = nibble1 < 10 ? '0' + nibble1 : 'A' + (nibble1 - 10);
char c2 = nibble2 < 10 ? '0' + nibble2 : 'A' + (nibble2 - 10);
StrSerialNumber[18 + (4*i) + 0] = c1; // [ 18, 22, .., 42, 46 ]
StrSerialNumber[18 + (4*i) + 2] = c2; // [ 20, 24, .., 44, 48 ]
StrSerialNumber[18 + (4 * i) + 0] = c1; // [ 18, 22, .., 42, 46 ]
StrSerialNumber[18 + (4 * i) + 2] = c2; // [ 20, 24, .., 44, 48 ]
}
StrSerialNumber[0] = USB_STRING_DESCRIPTOR_SERIAL_NUMBER_LENGTH;
}
Expand Down
7 changes: 4 additions & 3 deletions doc/commands.json
Original file line number Diff line number Diff line change
Expand Up @@ -3099,9 +3099,10 @@
"--fc <dec> facility code",
"--cn <dec> card number",
"-w, --wiegand <format> see `wiegand list` for available formats",
"--shallow use shallow (ASK) reader modulation instead of OOK"
"--shallow use shallow (ASK) reader modulation instead of OOK",
"-v verbose (print encoded blocks)"
],
"usage": "hf iclass encode [-h] [--bin <bin>] --ki <dec> [--credit] [--elite] [--raw] [--enckey <hex>] [--fc <dec>] [--cn <dec>] [-w <format>] [--shallow]"
"usage": "hf iclass encode [-hv] [--bin <bin>] --ki <dec> [--credit] [--elite] [--raw] [--enckey <hex>] [--fc <dec>] [--cn <dec>] [-w <format>] [--shallow]"
},
"hf iclass encrypt": {
"command": "hf iclass encrypt",
Expand Down Expand Up @@ -11903,6 +11904,6 @@
"metadata": {
"commands_extracted": 749,
"extracted_by": "PM3Help2JSON v1.00",
"extracted_on": "2023-02-18T01:26:44"
"extracted_on": "2023-02-18T20:20:19"
}
}

0 comments on commit c531bd0

Please sign in to comment.