NXP NFC Reader Library
v4.040.05.011646
|
Contains definitions which are generic throughout the library. More...
![]() |
Macros | |
#define | PH_CHECK_SUCCESS(status) {if ((status) != PH_ERR_SUCCESS) {return (status);}} |
Macro for error handling of underlying layer and exit. | |
#define | PH_ADD_COMPCODE(stat, code) ((phStatus_t)(((stat) == PH_ERR_SUCCESS) || ((stat) & PH_COMP_MASK) ? (stat) : (((stat) & PH_ERR_MASK) | ((code) & PH_COMP_MASK)))) |
Macro for component-error-code adding of current layer. | |
#define | PH_GET_COMPCODE(pId) ( (*((uint16_t*)(pId))) & PH_COMP_MASK ) |
Macro to get the component code or id using a pointer to a memory. | |
Running Modes of Reader Library | |
#define | RD_LIB_MODE_EMVCO 0x01U |
EMVCo Mode. More... | |
#define | RD_LIB_MODE_NFC 0x02U |
NFC Forum Mode. More... | |
#define | RD_LIB_MODE_ISO 0x03U |
ISO Mode. More... | |
Boolean Values | |
#define | PH_ON 0x0001U |
Enabled. More... | |
#define | PH_OFF 0x0000U |
Disabled. More... | |
#define | PH_SUPPORTED 0x0001U |
Supported. More... | |
#define | PH_UNSUPPORTED 0x0000U |
Not Supported. More... | |
Configuration | |
#define | PH_CONFIG_CUSTOM_BEGIN 0xE000U |
Starting number of custom configs. More... | |
Component identifiers | |
#define | PH_COMP_MASK 0xFF00U |
Component Mask for status code and component ID. More... | |
#define | PH_COMPID_MASK 0x00FFU |
ID Mask for component ID. More... | |
#define | PH_ERR_MASK 0x00FFU |
Error Mask for status code. More... | |
#define | PH_ERR_CUSTOM_BEGIN 0x0080U |
Starting number of custom error codes. More... | |
#define | PH_COMP_GENERIC 0x0000U |
Generic Component Code. More... | |
#define | PH_COMP_BAL 0x0100U |
BAL Component Code. More... | |
#define | PH_COMP_HAL 0x0200U |
HAL Component Code. More... | |
#define | PH_COMP_PAL_ISO14443P3A 0x0300U |
ISO14443-3A PAL-Component Code. More... | |
#define | PH_COMP_PAL_ISO14443P3B 0x0400U |
ISO14443-3B PAL-Component Code. More... | |
#define | PH_COMP_PAL_ISO14443P4A 0x0500U |
ISO14443-4A PAL-Component Code. More... | |
#define | PH_COMP_PAL_ISO14443P4 0x0600U |
ISO14443-4 PAL-Component Code. More... | |
#define | PH_COMP_PAL_MIFARE 0x0700U |
MIFARE(R) PAL-Component Code. More... | |
#define | PH_COMP_PAL_FELICA 0x0800U |
Open FeliCa PAL-Component Code. More... | |
#define | PH_COMP_PAL_EPCUID 0x0900U |
ICode EPC/UID PAL-Component Code. More... | |
#define | PH_COMP_PAL_SLI15693 0x0A00U |
ICode SLI/ISO15693 PAL-Component Code. More... | |
#define | PH_COMP_PAL_I18000P3M3 0x0B00U |
ISO18000-3 Mode3 PAL-Component Code. More... | |
#define | PH_COMP_PAL_I18092MPI 0x0C00U |
ISO18092 passive initiator mode PAL-Component Code. More... | |
#define | PH_COMP_PAL_I18092MT 0x0D00U |
ISO18092 target mode PAL-Component Code. More... | |
#define | PH_COMP_PAL_GENERALTARGET 0x0E00U |
General Target/Listen mode protocol. More... | |
#define | PH_COMP_PAL_I14443P4MC 0x0F00U |
ISO 14443-4 Card mode protocol. More... | |
#define | PH_COMP_AL_MFC 0x1000U |
MIFARE(R) Classic AL-Component Code. More... | |
#define | PH_COMP_AL_MFUL 0x1100U |
MIFARE(R) Ultralight AL-Component Code. More... | |
#define | PH_COMP_AL_MFP 0x1200U |
MIFARE(R) Plus AL-Component Code. More... | |
#define | PH_COMP_AL_VCA 0x1300U |
Virtual Card Architecture AL-Component Code. More... | |
#define | PH_COMP_AL_FELICA 0x1400U |
Open FeliCa AL-Component Code. More... | |
#define | PH_COMP_AL_I15693 0x1500U |
ISO15693 AL-Component Code. More... | |
#define | PH_COMP_AL_SLI 0x1600U |
ICode SLI AL-Component Code. More... | |
#define | PH_COMP_AL_I18000P3M3 0x1800U |
ISO18000-3 Mode3 AL-Component Code. More... | |
#define | PH_COMP_AL_MFDF 0x1900U |
MIFARE DESFIRE EV1 AL Component Code. More... | |
#define | PH_COMP_AL_MFDFEV2 0x2000U |
MIFARE DESFIRE EV2 AL Component Code. More... | |
#define | PH_COMP_AL_P40CMDPRIV 0x1A00U |
P40 command libraryAL-Component Code. More... | |
#define | PH_COMP_AL_P40CMDPUB 0x1B00U |
P40 command libraryAL-Component Code. More... | |
#define | PH_COMP_AL_T1T 0x1C00U |
T1T AL component code. | |
#define | PH_COMP_AL_TOP 0x1D00U |
Tag Operation AL component code. | |
#define | PH_COMP_DL_AMP 0x3000U |
Amplifier DL-Component Code. More... | |
#define | PH_COMP_DL_THSTRM 0x3100U |
Thermostream DL-Component Code. More... | |
#define | PH_COMP_DL_OSCI 0x3200U |
Oscilloscope DL-Component Code. More... | |
#define | PH_COMP_DL_RDFPGA 0x3300U |
Reader FPGA Box DL-Component Code. More... | |
#define | PH_COMP_DL_MSTAMPOSC 0x3400U |
Master Amplifier Oscilloscope DL-Component Code. More... | |
#define | PH_COMP_DL_STEPPER 0x3500U |
Stepper DL-Component Code. More... | |
#define | PH_COMP_AC_DISCLOOP 0x4000U |
Discovery Loop. More... | |
#define | PH_COMP_CE_T4T 0x5000U |
Card Emulation T4T. More... | |
#define | PH_COMP_LN_LLCP 0x6000U |
LLCP code. More... | |
#define | PH_COMP_NP_SNEP 0x7000U |
SNEP Code. More... | |
#define | PH_COMP_CIDMANAGER 0xE000U |
Cid Manager Component Code. More... | |
#define | PH_COMP_CRYPTOSYM 0xE100U |
CryptoSym Component Code. More... | |
#define | PH_COMP_KEYSTORE 0xE200U |
KeyStore Component Code. More... | |
#define | PH_COMP_TOOLS 0xE300U |
Tools Component Code. More... | |
#define | PH_COMP_CRYPTORNG 0xE400U |
CryptoRng Component Code. More... | |
#define | PH_COMP_LOG 0xEF00U |
Log Component Code. More... | |
#define | PH_COMP_OSAL 0xF000U |
OS AL component code. More... | |
#define | PH_COMP_PLATFORM 0xF100U |
MicroController Platform component code. More... | |
Exchange Options | |
#define | PH_EXCHANGE_DEFAULT 0x0000U |
Default exchange mode. More... | |
#define | PH_EXCHANGE_TXCHAINING 0x0001U |
ISO14443-4/ISO18092 specific: Chains given data to card/Target. More... | |
#define | PH_EXCHANGE_RXCHAINING 0x0002U |
ISO14443-4/ISO18092 specific: Starts transmission with and R(ACK) block and performs Rx chaining with the Card/Target. More... | |
#define | PH_EXCHANGE_RXCHAINING_BUFSIZE 0x0003U |
ISO14443-4/ISO18092 specific: Starts transmission with and R(ACK) block and performs Rx chaining with the card. More... | |
#define | PH_EXCHANGE_MODE_MASK 0x000FU |
Mask for the above modes. More... | |
#define | PH_EXCHANGE_CUSTOM_BITS_MASK 0x00F0U |
Mask for custom exchange bits. More... | |
#define | PH_EXCHANGE_LEAVE_BUFFER_BIT 0x4000U |
Does not clear the internal buffer before operation. More... | |
#define | PH_EXCHANGE_BUFFERED_BIT 0x8000U |
Buffers Tx-Data into internal buffer instead of transmitting it. | |
#define | PH_EXCHANGE_BUFFER_FIRST (PH_EXCHANGE_DEFAULT | PH_EXCHANGE_BUFFERED_BIT) |
The given data is the first part of a stream. More... | |
#define | PH_EXCHANGE_BUFFER_CONT (PH_EXCHANGE_DEFAULT | PH_EXCHANGE_BUFFERED_BIT | PH_EXCHANGE_LEAVE_BUFFER_BIT) |
The given data is a subsequent part of a stream. More... | |
#define | PH_EXCHANGE_BUFFER_LAST (PH_EXCHANGE_DEFAULT | PH_EXCHANGE_LEAVE_BUFFER_BIT) |
The given data is the last part of a stream. More... | |
#define | PH_TRANSMIT_DEFAULT 0x0000U |
Default transmit mode. More... | |
#define | PH_TRANSMIT_TXCHAINING 0x0001U |
Perform Transmit Chaining. More... | |
#define | PH_TRANSMIT_MODE_MASK 0x000FU |
Mask for the above modes. More... | |
#define | PH_TRANSMIT_LEAVE_BUFFER_BIT 0x4000U |
Does not clear the internal buffer before transmit operation. More... | |
#define | PH_TRANSMIT_BUFFERED_BIT 0x8000U |
Buffers Tx-Data into internal buffer instead of transmitting it. | |
#define | PH_TRANSMIT_BUFFER_FIRST (PH_TRANSMIT_DEFAULT | PH_TRANSMIT_BUFFERED_BIT) |
The given data is the first part of a stream. More... | |
#define | PH_TRANSMIT_BUFFER_CONT (PH_TRANSMIT_DEFAULT | PH_TRANSMIT_BUFFERED_BIT | PH_TRANSMIT_LEAVE_BUFFER_BIT) |
The given data is a subsequent part of a stream. More... | |
#define | PH_TRANSMIT_BUFFER_LAST (PH_TRANSMIT_DEFAULT | PH_TRANSMIT_LEAVE_BUFFER_BIT) |
The given data is the last part of a stream. More... | |
#define | PH_TRANSMIT_PREV_FRAME 0x1000U |
Perform Re-transmit of data stored in HAL Tx buffer. More... | |
#define | PH_RECEIVE_DEFAULT 0x0000U |
Default exchange mode. More... | |
#define | PH_RECEIVE_CHAINING 0x0001U |
ISO14443-4/ISO18092 specific: Starts transmission of ACK block and performs Rx chaining with the card. More... | |
#define | PH_RECEIVE_CHAINING_BUFSIZE 0x0002U |
ISO14443-4/ISO18092 specific: Starts transmission with ACK block and performs Rx chaining with the card. More... | |
Contains definitions which are generic throughout the library.
#define RD_LIB_MODE_EMVCO 0x01U |
EMVCo Mode.
#define RD_LIB_MODE_NFC 0x02U |
NFC Forum Mode.
#define RD_LIB_MODE_ISO 0x03U |
ISO Mode.
#define PH_ON 0x0001U |
Enabled.
#define PH_OFF 0x0000U |
Disabled.
#define PH_SUPPORTED 0x0001U |
Supported.
#define PH_UNSUPPORTED 0x0000U |
Not Supported.
#define PH_CONFIG_CUSTOM_BEGIN 0xE000U |
Starting number of custom configs.
#define PH_COMP_MASK 0xFF00U |
Component Mask for status code and component ID.
#define PH_COMPID_MASK 0x00FFU |
ID Mask for component ID.
#define PH_ERR_MASK 0x00FFU |
Error Mask for status code.
#define PH_ERR_CUSTOM_BEGIN 0x0080U |
Starting number of custom error codes.
#define PH_COMP_GENERIC 0x0000U |
Generic Component Code.
#define PH_COMP_BAL 0x0100U |
BAL Component Code.
#define PH_COMP_HAL 0x0200U |
HAL Component Code.
#define PH_COMP_PAL_ISO14443P3A 0x0300U |
ISO14443-3A PAL-Component Code.
#define PH_COMP_PAL_ISO14443P3B 0x0400U |
ISO14443-3B PAL-Component Code.
#define PH_COMP_PAL_ISO14443P4A 0x0500U |
ISO14443-4A PAL-Component Code.
#define PH_COMP_PAL_ISO14443P4 0x0600U |
ISO14443-4 PAL-Component Code.
#define PH_COMP_PAL_MIFARE 0x0700U |
MIFARE(R) PAL-Component Code.
#define PH_COMP_PAL_FELICA 0x0800U |
Open FeliCa PAL-Component Code.
#define PH_COMP_PAL_EPCUID 0x0900U |
ICode EPC/UID PAL-Component Code.
#define PH_COMP_PAL_SLI15693 0x0A00U |
ICode SLI/ISO15693 PAL-Component Code.
#define PH_COMP_PAL_I18000P3M3 0x0B00U |
ISO18000-3 Mode3 PAL-Component Code.
#define PH_COMP_PAL_I18092MPI 0x0C00U |
ISO18092 passive initiator mode PAL-Component Code.
#define PH_COMP_PAL_I18092MT 0x0D00U |
ISO18092 target mode PAL-Component Code.
#define PH_COMP_PAL_GENERALTARGET 0x0E00U |
General Target/Listen mode protocol.
#define PH_COMP_PAL_I14443P4MC 0x0F00U |
ISO 14443-4 Card mode protocol.
#define PH_COMP_AL_MFC 0x1000U |
MIFARE(R) Classic AL-Component Code.
#define PH_COMP_AL_MFUL 0x1100U |
MIFARE(R) Ultralight AL-Component Code.
#define PH_COMP_AL_MFP 0x1200U |
MIFARE(R) Plus AL-Component Code.
#define PH_COMP_AL_VCA 0x1300U |
Virtual Card Architecture AL-Component Code.
#define PH_COMP_AL_FELICA 0x1400U |
Open FeliCa AL-Component Code.
#define PH_COMP_AL_I15693 0x1500U |
ISO15693 AL-Component Code.
#define PH_COMP_AL_SLI 0x1600U |
ICode SLI AL-Component Code.
#define PH_COMP_AL_I18000P3M3 0x1800U |
ISO18000-3 Mode3 AL-Component Code.
#define PH_COMP_AL_MFDF 0x1900U |
MIFARE DESFIRE EV1 AL Component Code.
#define PH_COMP_AL_MFDFEV2 0x2000U |
MIFARE DESFIRE EV2 AL Component Code.
#define PH_COMP_AL_P40CMDPRIV 0x1A00U |
P40 command libraryAL-Component Code.
#define PH_COMP_AL_P40CMDPUB 0x1B00U |
P40 command libraryAL-Component Code.
#define PH_COMP_DL_AMP 0x3000U |
Amplifier DL-Component Code.
#define PH_COMP_DL_THSTRM 0x3100U |
Thermostream DL-Component Code.
#define PH_COMP_DL_OSCI 0x3200U |
Oscilloscope DL-Component Code.
#define PH_COMP_DL_RDFPGA 0x3300U |
Reader FPGA Box DL-Component Code.
#define PH_COMP_DL_MSTAMPOSC 0x3400U |
Master Amplifier Oscilloscope DL-Component Code.
#define PH_COMP_DL_STEPPER 0x3500U |
Stepper DL-Component Code.
#define PH_COMP_AC_DISCLOOP 0x4000U |
Discovery Loop.
#define PH_COMP_CE_T4T 0x5000U |
Card Emulation T4T.
#define PH_COMP_LN_LLCP 0x6000U |
LLCP code.
#define PH_COMP_NP_SNEP 0x7000U |
SNEP Code.
#define PH_COMP_CIDMANAGER 0xE000U |
Cid Manager Component Code.
#define PH_COMP_CRYPTOSYM 0xE100U |
CryptoSym Component Code.
#define PH_COMP_KEYSTORE 0xE200U |
KeyStore Component Code.
#define PH_COMP_TOOLS 0xE300U |
Tools Component Code.
#define PH_COMP_CRYPTORNG 0xE400U |
CryptoRng Component Code.
#define PH_COMP_LOG 0xEF00U |
Log Component Code.
#define PH_COMP_OSAL 0xF000U |
OS AL component code.
#define PH_COMP_PLATFORM 0xF100U |
MicroController Platform component code.
#define PH_EXCHANGE_DEFAULT 0x0000U |
Default exchange mode.
Combine with PH_EXCHANGE_BUFFERED_BIT and PH_EXCHANGE_LEAVE_BUFFER_BIT to perform buffering. ISO14443-4/ISO18092
specific: Performs Tx/Rx chaining with the card. Returns PH_ERR_SUCCESS_CHAINING when RxBuffer is full and does not ACK the last received block.
#define PH_EXCHANGE_TXCHAINING 0x0001U |
ISO14443-4/ISO18092
specific: Chains given data to card/Target.
Combine with PH_EXCHANGE_BUFFERED_BIT and PH_EXCHANGE_LEAVE_BUFFER_BIT to perform buffering. Does not receive any data.
#define PH_EXCHANGE_RXCHAINING 0x0002U |
ISO14443-4/ISO18092
specific: Starts transmission with and R(ACK) block and performs Rx chaining with the Card/Target.
Returns PH_ERR_SUCCESS_CHAINING when RxBuffer is full and does not ACK the last received block.
#define PH_EXCHANGE_RXCHAINING_BUFSIZE 0x0003U |
ISO14443-4/ISO18092
specific: Starts transmission with and R(ACK) block and performs Rx chaining with the card.
Completes Rx chaining with the card if RxBuffer is full.
#define PH_EXCHANGE_MODE_MASK 0x000FU |
Mask for the above modes.
All other bits are reserved.
#define PH_EXCHANGE_CUSTOM_BITS_MASK 0x00F0U |
Mask for custom exchange bits.
These 4 bits can be used for custom exchange behavior.
#define PH_EXCHANGE_LEAVE_BUFFER_BIT 0x4000U |
Does not clear the internal buffer before operation.
If this bit is set and data is transmitted, the contents of the internal buffer are sent first.
#define PH_EXCHANGE_BUFFER_FIRST (PH_EXCHANGE_DEFAULT | PH_EXCHANGE_BUFFERED_BIT) |
The given data is the first part of a stream.
(Helper definition for buffering).
#define PH_EXCHANGE_BUFFER_CONT (PH_EXCHANGE_DEFAULT | PH_EXCHANGE_BUFFERED_BIT | PH_EXCHANGE_LEAVE_BUFFER_BIT) |
The given data is a subsequent part of a stream.
(Helper definition for buffering).
#define PH_EXCHANGE_BUFFER_LAST (PH_EXCHANGE_DEFAULT | PH_EXCHANGE_LEAVE_BUFFER_BIT) |
The given data is the last part of a stream.
(Helper definition for buffering).
#define PH_TRANSMIT_DEFAULT 0x0000U |
Default transmit mode.
Combine with PH_TRANSMIT_BUFFERED_BIT and PH_TRANSMIT_LEAVE_BUFFER_BIT to perform buffering.
#define PH_TRANSMIT_TXCHAINING 0x0001U |
Perform Transmit Chaining.
Combine with PH_TRANSMIT_BUFFERED_BIT and PH_TRANSMIT_LEAVE_BUFFER_BIT to perform buffering.
#define PH_TRANSMIT_MODE_MASK 0x000FU |
Mask for the above modes.
All other bits are reserved.
#define PH_TRANSMIT_LEAVE_BUFFER_BIT 0x4000U |
Does not clear the internal buffer before transmit operation.
If this bit is set and data is transmitted, the contents of the internal buffer are sent first.
#define PH_TRANSMIT_BUFFER_FIRST (PH_TRANSMIT_DEFAULT | PH_TRANSMIT_BUFFERED_BIT) |
The given data is the first part of a stream.
(Helper definition for buffering).
#define PH_TRANSMIT_BUFFER_CONT (PH_TRANSMIT_DEFAULT | PH_TRANSMIT_BUFFERED_BIT | PH_TRANSMIT_LEAVE_BUFFER_BIT) |
The given data is a subsequent part of a stream.
(Helper definition for buffering).
#define PH_TRANSMIT_BUFFER_LAST (PH_TRANSMIT_DEFAULT | PH_TRANSMIT_LEAVE_BUFFER_BIT) |
The given data is the last part of a stream.
(Helper definition for buffering).
#define PH_TRANSMIT_PREV_FRAME 0x1000U |
Perform Re-transmit of data stored in HAL Tx buffer.
Should not be combined with PH_TRANSMIT_BUFFERED_BIT and PH_TRANSMIT_LEAVE_BUFFER_BIT. This option should be used only in target / PICC mode.
#define PH_RECEIVE_DEFAULT 0x0000U |
Default exchange mode.
ISO14443-4/ISO18092
specific: Performs Rx chaining with the card. Returns PH_ERR_SUCCESS_CHAINING when RxBuffer is full and does not ACK the last received block.
#define PH_RECEIVE_CHAINING 0x0001U |
ISO14443-4/ISO18092
specific: Starts transmission of ACK block and performs Rx chaining with the card.
Returns PH_ERR_SUCCESS_CHAINING when RxBuffer is full and does not ACK the last received block.
#define PH_RECEIVE_CHAINING_BUFSIZE 0x0002U |
ISO14443-4/ISO18092
specific: Starts transmission with ACK block and performs Rx chaining with the card.
Completes Rx chaining with the card if RxBuffer is full.