From 29c15b34808cac7cb79ba9db5d27d9f98f3ba682 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 29 Jan 2018 13:48:18 +0100 Subject: [PATCH] cHG.. missing --- client/mifarehost.c | 4 ++-- include/mifare.h | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/client/mifarehost.c b/client/mifarehost.c index 8c2c75b55..24d20dda8 100644 --- a/client/mifarehost.c +++ b/client/mifarehost.c @@ -608,8 +608,8 @@ int saveTraceCard(void) { // given 4096 tracecard size, these loop will only match a 1024, 1kb card memory // 4086/16 == 256blocks. - for (int i = 0; i < 256; i++) { // blocks - for (int j = 0; j < 16; j++) // bytes + for (uint16_t i = 0; i < 256; i++) { // blocks + for (uint8_t j = 0; j < 16; j++) // bytes fprintf(f, "%02X", *(traceCard + i * 16 + j)); // no extra line in the end diff --git a/include/mifare.h b/include/mifare.h index facf81d57..6943518d8 100644 --- a/include/mifare.h +++ b/include/mifare.h @@ -89,4 +89,19 @@ typedef struct { } state; } nonces_t; +//----------------------------------------------------------------------------- +// FeliCa +//----------------------------------------------------------------------------- +typedef struct { + uint8_t uid[8]; +} __attribute__((__packed__)) felica_card_select_t; + +typedef enum FELICA_COMMAND { + FELICA_CONNECT = (1 << 0), + FELICA_NO_DISCONNECT = (1 << 1), + FELICA_RAW = (1 << 3), + FELICA_APPEND_CRC = (1 << 5), + FELICA_NO_SELECT = (1 << 6), +} felica_command_t; + #endif // _MIFARE_H_