mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-07-25 05:01:52 +00:00
Change byte_t type to uint8_t (Fixes Issue 147)
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
|
||||
# include <nfc/nfc-types.h>
|
||||
|
||||
// Compiler directive, set struct alignment to 1 byte_t for compatibility
|
||||
// Compiler directive, set struct alignment to 1 uint8_t for compatibility
|
||||
# pragma pack(1)
|
||||
|
||||
typedef enum {
|
||||
@@ -54,16 +54,16 @@ typedef enum {
|
||||
|
||||
// MIFARE command params
|
||||
struct mifare_param_auth {
|
||||
byte_t abtKey[6];
|
||||
byte_t abtUid[4];
|
||||
uint8_t abtKey[6];
|
||||
uint8_t abtUid[4];
|
||||
};
|
||||
|
||||
struct mifare_param_data {
|
||||
byte_t abtData[16];
|
||||
uint8_t abtData[16];
|
||||
};
|
||||
|
||||
struct mifare_param_value {
|
||||
byte_t abtValue[4];
|
||||
uint8_t abtValue[4];
|
||||
};
|
||||
|
||||
typedef union {
|
||||
@@ -77,26 +77,26 @@ typedef union {
|
||||
|
||||
bool nfc_initiator_mifare_cmd (nfc_device * pnd, const mifare_cmd mc, const uint8_t ui8Block, mifare_param * pmp);
|
||||
|
||||
// Compiler directive, set struct alignment to 1 byte_t for compatibility
|
||||
// Compiler directive, set struct alignment to 1 uint8_t for compatibility
|
||||
# pragma pack(1)
|
||||
|
||||
// MIFARE Classic
|
||||
typedef struct {
|
||||
byte_t abtUID[4];
|
||||
byte_t btBCC;
|
||||
byte_t btUnknown;
|
||||
byte_t abtATQA[2];
|
||||
byte_t abtUnknown[8];
|
||||
uint8_t abtUID[4];
|
||||
uint8_t btBCC;
|
||||
uint8_t btUnknown;
|
||||
uint8_t abtATQA[2];
|
||||
uint8_t abtUnknown[8];
|
||||
} mifare_classic_block_manufacturer;
|
||||
|
||||
typedef struct {
|
||||
byte_t abtData[16];
|
||||
uint8_t abtData[16];
|
||||
} mifare_classic_block_data;
|
||||
|
||||
typedef struct {
|
||||
byte_t abtKeyA[6];
|
||||
byte_t abtAccessBits[4];
|
||||
byte_t abtKeyB[6];
|
||||
uint8_t abtKeyA[6];
|
||||
uint8_t abtAccessBits[4];
|
||||
uint8_t abtKeyB[6];
|
||||
} mifare_classic_block_trailer;
|
||||
|
||||
typedef union {
|
||||
@@ -111,17 +111,17 @@ typedef struct {
|
||||
|
||||
// MIFARE Ultralight
|
||||
typedef struct {
|
||||
byte_t sn0[3];
|
||||
byte_t btBCC0;
|
||||
byte_t sn1[4];
|
||||
byte_t btBCC1;
|
||||
byte_t internal;
|
||||
byte_t lock[2];
|
||||
byte_t otp[4];
|
||||
uint8_t sn0[3];
|
||||
uint8_t btBCC0;
|
||||
uint8_t sn1[4];
|
||||
uint8_t btBCC1;
|
||||
uint8_t internal;
|
||||
uint8_t lock[2];
|
||||
uint8_t otp[4];
|
||||
} mifareul_block_manufacturer;
|
||||
|
||||
typedef struct {
|
||||
byte_t abtData[16];
|
||||
uint8_t abtData[16];
|
||||
} mifareul_block_data;
|
||||
|
||||
typedef union {
|
||||
|
||||
Reference in New Issue
Block a user