Merge pull request #2012 from hb9xar/master

gcc 11.2.1 - missing includes / correction for LEGIC CRC16 calculation
This commit is contained in:
Iceman 2023-06-22 23:20:21 +02:00 committed by GitHub
commit c953ad6957
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View file

@ -682,7 +682,7 @@ static int CmdLegicCalcCrc(const char *Cmd) {
switch (type) { switch (type) {
case 16: case 16:
init_table(CRC_LEGIC); init_table(CRC_LEGIC_16);
PrintAndLogEx(SUCCESS, "Legic crc16: %X", crc16_legic(data, data_len, mcc[0])); PrintAndLogEx(SUCCESS, "Legic crc16: %X", crc16_legic(data, data_len, mcc[0]));
break; break;
default: default:

View file

@ -33,6 +33,7 @@
#include <time.h> #include <time.h>
#include <pthread.h> #include <pthread.h>
#include <unistd.h> #include <unistd.h>
#include <inttypes.h>
#include "util_posix.h" #include "util_posix.h"
#define AEND "\x1b[0m" #define AEND "\x1b[0m"

View file

@ -35,6 +35,7 @@
#include <time.h> #include <time.h>
#include <pthread.h> #include <pthread.h>
#include <unistd.h> #include <unistd.h>
#include <inttypes.h>
//#include <mbedtls/aes.h> //#include <mbedtls/aes.h>
#include "util_posix.h" #include "util_posix.h"
#include "randoms.h" #include "randoms.h"