arg names

This commit is contained in:
Philippe Teuwen 2019-04-06 21:46:00 +02:00
commit 51d6fa13eb
32 changed files with 69 additions and 69 deletions

View file

@ -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