Change byte_t type to uint8_t (Fixes Issue 147)
This commit is contained in:
parent
ce846931bc
commit
784a2f86a2
43 changed files with 442 additions and 444 deletions
|
|
@ -32,8 +32,6 @@
|
|||
# include <stdbool.h>
|
||||
# include <stdio.h>
|
||||
|
||||
typedef uint8_t byte_t;
|
||||
|
||||
# define DEVICE_NAME_LENGTH 256
|
||||
# define DEVICE_PORT_LENGTH 64
|
||||
|
||||
|
|
@ -59,7 +57,7 @@ typedef struct {
|
|||
selecting tags supporting it? */
|
||||
bool bAutoIso14443_4;
|
||||
/** Supported modulation encoded in a byte */
|
||||
byte_t btSupportByte;
|
||||
uint8_t btSupportByte;
|
||||
/** Last error reported by the PCD / encountered by the PCD driver
|
||||
* MSB LSB
|
||||
* | 00 | 00 |
|
||||
|
|
@ -73,7 +71,7 @@ typedef struct {
|
|||
|
||||
typedef char nfc_connstring[1024];
|
||||
|
||||
// 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)
|
||||
|
||||
/**
|
||||
|
|
@ -155,19 +153,19 @@ typedef enum {
|
|||
*/
|
||||
typedef struct {
|
||||
/** NFCID3 */
|
||||
byte_t abtNFCID3[10];
|
||||
uint8_t abtNFCID3[10];
|
||||
/** DID */
|
||||
byte_t btDID;
|
||||
uint8_t btDID;
|
||||
/** Supported send-bit rate */
|
||||
byte_t btBS;
|
||||
uint8_t btBS;
|
||||
/** Supported receive-bit rate */
|
||||
byte_t btBR;
|
||||
uint8_t btBR;
|
||||
/** Timeout value */
|
||||
byte_t btTO;
|
||||
uint8_t btTO;
|
||||
/** PP Parameters */
|
||||
byte_t btPP;
|
||||
uint8_t btPP;
|
||||
/** General Bytes */
|
||||
byte_t abtGB[48];
|
||||
uint8_t abtGB[48];
|
||||
size_t szGB;
|
||||
/** DEP mode */
|
||||
nfc_dep_mode ndm;
|
||||
|
|
@ -178,12 +176,12 @@ typedef struct {
|
|||
* @brief NFC ISO14443A tag (MIFARE) information
|
||||
*/
|
||||
typedef struct {
|
||||
byte_t abtAtqa[2];
|
||||
byte_t btSak;
|
||||
uint8_t abtAtqa[2];
|
||||
uint8_t btSak;
|
||||
size_t szUidLen;
|
||||
byte_t abtUid[10];
|
||||
uint8_t abtUid[10];
|
||||
size_t szAtsLen;
|
||||
byte_t abtAts[254]; // Maximal theoretical ATS is FSD-2, FSD=256 for FSDI=8 in RATS
|
||||
uint8_t abtAts[254]; // Maximal theoretical ATS is FSD-2, FSD=256 for FSDI=8 in RATS
|
||||
} nfc_iso14443a_info;
|
||||
|
||||
/**
|
||||
|
|
@ -192,10 +190,10 @@ typedef struct {
|
|||
*/
|
||||
typedef struct {
|
||||
size_t szLen;
|
||||
byte_t btResCode;
|
||||
byte_t abtId[8];
|
||||
byte_t abtPad[8];
|
||||
byte_t abtSysCode[2];
|
||||
uint8_t btResCode;
|
||||
uint8_t abtId[8];
|
||||
uint8_t abtPad[8];
|
||||
uint8_t abtSysCode[2];
|
||||
} nfc_felica_info;
|
||||
|
||||
/**
|
||||
|
|
@ -204,11 +202,11 @@ typedef struct {
|
|||
*/
|
||||
typedef struct {
|
||||
/** abtPupi store PUPI contained in ATQB (Answer To reQuest of type B) (see ISO14443-3) */
|
||||
byte_t abtPupi[4];
|
||||
uint8_t abtPupi[4];
|
||||
/** abtApplicationData store Application Data contained in ATQB (see ISO14443-3) */
|
||||
byte_t abtApplicationData[4];
|
||||
uint8_t abtApplicationData[4];
|
||||
/** abtProtocolInfo store Protocol Info contained in ATQB (see ISO14443-3) */
|
||||
byte_t abtProtocolInfo[3];
|
||||
uint8_t abtProtocolInfo[3];
|
||||
/** ui8CardIdentifier store CID (Card Identifier) attributted by PCD to the PICC */
|
||||
uint8_t ui8CardIdentifier;
|
||||
} nfc_iso14443b_info;
|
||||
|
|
@ -219,14 +217,14 @@ typedef struct {
|
|||
*/
|
||||
typedef struct {
|
||||
/** DIV: 4 LSBytes of tag serial number */
|
||||
byte_t abtDIV[4];
|
||||
uint8_t abtDIV[4];
|
||||
/** Software version & type of REPGEN */
|
||||
byte_t btVerLog;
|
||||
uint8_t btVerLog;
|
||||
/** Config Byte, present if long REPGEN */
|
||||
byte_t btConfig;
|
||||
uint8_t btConfig;
|
||||
/** ATR, if any */
|
||||
size_t szAtrLen;
|
||||
byte_t abtAtr[33];
|
||||
uint8_t abtAtr[33];
|
||||
} nfc_iso14443bi_info;
|
||||
|
||||
/**
|
||||
|
|
@ -234,7 +232,7 @@ typedef struct {
|
|||
* @brief NFC ISO14443-2B ST SRx tag information
|
||||
*/
|
||||
typedef struct {
|
||||
byte_t abtUID[8];
|
||||
uint8_t abtUID[8];
|
||||
} nfc_iso14443b2sr_info;
|
||||
|
||||
/**
|
||||
|
|
@ -242,9 +240,9 @@ typedef struct {
|
|||
* @brief NFC ISO14443-2B ASK CTx tag information
|
||||
*/
|
||||
typedef struct {
|
||||
byte_t abtUID[4];
|
||||
byte_t btProdCode;
|
||||
byte_t btFabCode;
|
||||
uint8_t abtUID[4];
|
||||
uint8_t btProdCode;
|
||||
uint8_t btFabCode;
|
||||
} nfc_iso14443b2ct_info;
|
||||
|
||||
/**
|
||||
|
|
@ -252,8 +250,8 @@ typedef struct {
|
|||
* @brief NFC Jewel tag information
|
||||
*/
|
||||
typedef struct {
|
||||
byte_t btSensRes[2];
|
||||
byte_t btId[4];
|
||||
uint8_t btSensRes[2];
|
||||
uint8_t btId[4];
|
||||
} nfc_jewel_info;
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue