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 underlaying 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. | |
Boolean Values | |
| #define | PH_ON 0x0001U |
| Enabled. | |
| #define | PH_OFF 0x0000U |
| Disabled. | |
| #define | PH_SUPPORTED 0x0001U |
| Supported. | |
| #define | PH_UNSUPPORTED 0x0000U |
| Not Supported. | |
Running Modes of Reader 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 | RD_LIB_MODE_FELICA 0x04U |
| FeliCa Mode. | |
Configuration | |
| #define | PH_CONFIG_CUSTOM_BEGIN 0xE000U |
| Starting number of custom configs. | |
| #define | PH_ERR_CUSTOM_BEGIN 0x0080U |
| Starting number of custom error codes. | |
Component identifiers | |
| #define | PH_COMP_MASK ((phStatus_t) 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_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 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_I7816P4 (0x0D00U) |
| ISO7816 P4 PAL-Component Code. | |
| #define | PH_COMP_PAL_I7816P4A (0x0E00U) |
| ISO7816 P4A PAL-Component Code. | |
| #define | PH_COMP_AL_MFC (0x1000U) |
| MIFARE Classic Contactless IC AL-Component Code. | |
| #define | PH_COMP_AL_MFUL (0x1100U) |
| MIFARE Ultralight Contactless IC AL-Component Code. | |
| #define | PH_COMP_AL_MFP (0x1200U) |
| MIFARE Plus Contactless IC 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_ICODE (0x1500U) |
| ICode 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_P40CMDPRIV (0x1A00U) |
| P40 command libraryAL-Component Code. | |
| #define | PH_COMP_AL_P40CMDPUB (0x1B00U) |
| P40 command libraryAL-Component Code. | |
| #define | PH_COMP_AL_MFDFEVX (0x2000U) |
| MIFARE DESFIRE EVx Contactless IC (for Ev2, Ev3 and future versions) AL Component Code. | |
| #define | PH_COMP_AL_MFPEVX (0x2100U) |
| MIFARE Plus EVx Contactless IC (for Ev1 and future versions) AL-Component Code. | |
| #define | PH_COMP_AL_MFDFLIGHT (0x2300U) |
| MIFARE Prime Match AL Component Code. | |
| #define | PH_COMP_AL_MFPRIMENTAG (0x2400U) |
| MIFARE Prime NTag AL Component Code. | |
| #define | PH_COMP_AL_MFIDENTITY (0x2500U) |
| MIFARE Prime Identity AL Component Code. | |
| #define | PH_COMP_AL_MFNTAG42XDNA (0x2600U) |
| MIFARE Prime Ntag42XDna AL Component Code. | |
| #define | PH_COMP_AL_MFDUOX (0x2700U) |
| MIFARE DUOX AL Component Code. | |
| #define | PH_COMP_AL_NTAGXDNA (0x2800U) |
| NTAG X DNA AL 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_DL_POWERSUPPLY (0x3600U) |
| PowerSupply DL-Component Code. | |
| #define | PH_COMP_DL_SPA (0x3700U) |
| Spectrum Analyzer DL-Component Code. | |
| #define | PH_COMP_DL_ISO3 (0x3800U) |
| ISO3 DL-Component 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_TMIUTILS (0xE500U) |
| TMI Utilities Code. | |
| #define | PH_COMP_CRYPTOASYM (0xE600U) |
| CryptoASym Component Code. | |
| #define | PH_COMP_LOG (0xEF00U) |
| Log Component Code. | |
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. More... | |
| #define | PH_EXCHANGE_RXCHAINING 0x0002U |
ISO14443-4/ISO18092 specific: Starts transmission with and R(ACK) block and performs Rx chaining with the card. 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_BYTES_TO_READ 0x0004U |
Number of Bytes to Read information is available while performing exchanges via peripheral(s). | |
| #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_BUFFER_MASK 0xF000U |
| Masking out the exchange bits. | |
| #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... | |
Log Interface | |
| #define | PH_LOG_VAR(pName) pName##_log |
| #define | PH_LOG_HELPER_ALLOCATE_PARAMNAME(pParam) PH_LOG_ALLOCATE_PARAMNAME(pParam) |
| #define | PH_LOG_HELPER_ALLOCATE_TEXT(pIdent, pText) PH_LOG_ALLOCATE_TEXT(pIdent, pText) |
| #define | PH_LOG_HELPER_ADDSTRING(bLogType, pString) phLog_AddString(pDataParams, (bLogType), (pString)) |
| #define | PH_LOG_HELPER_ADDPARAM_UINT8(bLogType, pName, pParam) phLog_AddParam_Uint8(pDataParams, (bLogType), (pName), (pParam)) |
| #define | PH_LOG_HELPER_ADDPARAM_UINT16(bLogType, pName, pParam) phLog_AddParam_Uint16(pDataParams, (bLogType), (pName), (pParam)) |
| #define | PH_LOG_HELPER_ADDPARAM_UINT32(bLogType, pName, pParam) phLog_AddParam_Uint32(pDataParams, (bLogType), (pName), (pParam)) |
| #define | PH_LOG_HELPER_ADDPARAM_UINT64(blogType, pName, pParam) phLog_AddParam_Uint64(pDataParams, (blogType), (pName), (pParam)) |
| #define | PH_LOG_HELPER_ADDPARAM_INT32(blogType, pName, pParam) phLog_AddParam_Int32(pDataParams, (blogType), (pName), (pParam)) |
| #define | PH_LOG_HELPER_ADDPARAM_INT64(blogType, pName, pParam) phLog_AddParam_Int64(pDataParams, (blogType), (pName), (pParam)) |
| #define | PH_LOG_HELPER_ADDPARAM_FLOAT64(blogType, pName, pParam) phLog_AddParam_Float64(pDataParams, (blogType), (pName), (pParam)) |
| #define | PH_LOG_HELPER_ADDPARAM_BUFFER(bLogType, pName, pParam, wLength) phLog_AddParam_Buffer(pDataParams, (bLogType),(pName),(pParam),(wLength)) |
| #define | PH_LOG_HELPER_EXECUTE(bOption) phLog_Execute(pDataParams, (bOption)) |
Debug Definitions | |
| #define | PH_ASSERT_NULL(a) |
| #define | PH_ASSERT_NULL_PARAM(a, comp_code) { if((a) == NULL) { return PH_ADD_COMPCODE(PH_ERR_INVALID_PARAMETER, (comp_code)); } } |
| #define | PH_ASSERT_NULL_DATA_PARAM(dataparams, comp_code) { if((dataparams) == NULL) { return PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, (comp_code)); } } |
Contains definitions which are generic throughout the library.
| #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 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.
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.
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).