mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
arg names
This commit is contained in:
parent
ebdfba033d
commit
51d6fa13eb
32 changed files with 69 additions and 69 deletions
|
@ -9,21 +9,21 @@
|
|||
|
||||
static uint16_t crc_table[256];
|
||||
static bool crc_table_init = false;
|
||||
static CrcType_t crc_type = CRC_NONE;
|
||||
static CrcType_t current_crc_type = CRC_NONE;
|
||||
|
||||
void init_table(CrcType_t ct) {
|
||||
void init_table(CrcType_t crctype) {
|
||||
|
||||
// same crc algo, and initialised already
|
||||
if (ct == crc_type && crc_table_init)
|
||||
if (crctype == current_crc_type && crc_table_init)
|
||||
return;
|
||||
|
||||
// not the same crc algo. reset table.
|
||||
if (ct != crc_type)
|
||||
if (crctype != current_crc_type)
|
||||
reset_table();
|
||||
|
||||
crc_type = ct;
|
||||
current_crc_type = crctype;
|
||||
|
||||
switch (ct) {
|
||||
switch (crctype) {
|
||||
case CRC_14443_A:
|
||||
case CRC_14443_B:
|
||||
case CRC_15693:
|
||||
|
@ -44,7 +44,7 @@ void init_table(CrcType_t ct) {
|
|||
break;
|
||||
default:
|
||||
crc_table_init = false;
|
||||
crc_type = CRC_NONE;
|
||||
current_crc_type = CRC_NONE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ void generate_table(uint16_t polynomial, bool refin) {
|
|||
void reset_table(void) {
|
||||
memset(crc_table, 0, sizeof(crc_table));
|
||||
crc_table_init = false;
|
||||
crc_type = CRC_NONE;
|
||||
current_crc_type = CRC_NONE;
|
||||
}
|
||||
|
||||
// table lookup LUT solution
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue