NXP NFC Reader Library  v4.040.05.011646
(Private definitions)

Private definitions and functions of all components. More...

Collaboration diagram for (Private definitions):

Macros

#define PHAL_MFC_RESP_ACK   0x0A
 MIFARE Classic ACK response code.
 
#define PHAL_MFC_RESP_NAK0   0x00
 MIFARE Classic NAK0 response code.
 
#define PHAL_MFC_RESP_NAK1   0x01
 MIFARE Classic NAK1 response code.
 
#define PHAL_MFC_RESP_NAK4   0x04
 MIFARE Classic NAK4 response code.
 
#define PHAL_MFC_RESP_NAK5   0x05
 MIFARE Classic NAK5 response code.
 
#define PHAL_MFC_CMD_RESTORE   0xC2
 MIFARE Classic Restore command byte.
 
#define PHAL_MFC_CMD_INCREMENT   0xC1
 MIFARE Classic Increment command byte.
 
#define PHAL_MFC_CMD_DECREMENT   0xC0
 MIFARE Classic Decrement command byte.
 
#define PHAL_MFC_CMD_TRANSFER   0xB0
 MIFARE Classic Transfer command byte.
 
#define PHAL_MFC_CMD_READ   0x30
 MIFARE Classic Read command byte.
 
#define PHAL_MFC_CMD_WRITE   0xA0
 MIFARE Classic Write command byte.
 
#define PHAL_MFC_CMD_AUTHA   0x60
 MIFARE Classic Authenticate A command byte.
 
#define PHAL_MFC_CMD_AUTHB   0x61
 MIFARE Classic Authenticate B command byte.
 
#define PHAL_MFC_CMD_PERSOUID   0x40
 MIFARE Classic Personalize UID command.
 
#define PHAL_MFC_CMD_GETVERSION   0x62
 MIFARE Classic GET VERSION command.
 
#define PHAL_MFC_VERSION_LENGTH   0x08
 Length of a Version MIFARE(R) Classic data block.
 
#define PHAL_MFP_TRUNCATED_MAC_SIZE   8
 Size of the truncated MAC. More...
 
#define PHAL_MFP_MIFARE_VALUE_BLOCK_SIZE   4
 Size of a MIFARE value block. More...
 
#define PHAL_MFP_MIFARE_BLOCK_SIZE   16
 Size of the MIFARE blocks. More...
 
#define PHAL_MFP_PC_RND_LEN   7
 Size of the Proximity Check Random numbers. More...
 
#define PHAL_MFUL_RESP_ACK   0x0AU
 MIFARE Ultralight ACK response code.
 
#define PHAL_MFUL_RESP_NAK0   0x00U
 MIFARE Ultralight NAK0 response code.
 
#define PHAL_MFUL_RESP_NAK1   0x01U
 MIFARE Ultralight NAK1 response code.
 
#define PHAL_MFUL_RESP_NAK4   0x04U
 MIFARE Ultralight NAK4 response code.
 
#define PHAL_MFUL_RESP_NAK5   0x05U
 MIFARE Ultralight NAK5 response code.
 
#define PHAL_MFUL_CMD_READ   0x30U
 MIFARE Ultralight Read command byte.
 
#define PHAL_MFUL_CMD_COMPWRITE   0xA0U
 MIFARE Ultralight Compatibility Write command byte.
 
#define PHAL_MFUL_CMD_WRITE   0xA2U
 MIFARE Ultralight Write command byte.
 
#define PHAL_MFUL_CMD_AUTH   0x1AU
 MIFARE Ultralight Authenticate command byte.
 
#define PHAL_MFUL_CMD_INCR_CNT   0xA5U
 MIFARE Ultralight Increment count command byte.
 
#define PHAL_MFUL_CMD_READ_CNT   0x39U
 MIFARE Ultralight Read counter command byte.
 
#define PHAL_MFUL_CMD_PWD_AUTH   0x1BU
 MIFARE Ultralight Password Auth command byte.
 
#define PHAL_MFUL_CMD_GET_VER   0x60U
 MIFARE Ultralight Get version command byte.
 
#define PHAL_MFUL_CMD_FAST_READ   0x3AU
 MIFARE Ultralight Fast read command byte.
 
#define PHAL_MFUL_CMD_READ_SIG   0x3CU
 MIFARE Ultralight Read signature command byte.
 
#define PHAL_MFUL_CMD_CHK_TRG_EVT   0x3EU
 MIFARE Ultralight Check tearing event command byte.
 
#define PHAL_MFUL_CMD_SECTOR_SELECT   0xC2U
 Type 2 tag sector select command byte.
 
#define PHAL_MFUL_PREAMBLE_TX   0xAFU
 MIFARE Ultralight preamble byte (tx) for authentication. More...
 
#define PHAL_MFUL_PREAMBLE_RX   0x00U
 MIFARE Ultralight preamble byte (rx) for authentication. More...
 
#define PHAL_MFUL_COMPWRITE_BLOCK_LENGTH   16U
 Length of a compatibility write MIFARE(R) Ultralight data block. More...
 
#define PHAL_T1T_READUID_RESP_LEN   6U
 T1T RID response len.
 
#define PHAL_T1T_READALL_RESP_LEN   122U
 T1T RALL response len.
 
#define PHAL_T1T_READBYTE_RESP_LEN   2U
 T1T Read response len.
 
#define PHAL_T1T_WRITEERASEBYTE_RESP_LEN   2U
 T1T Write_E response len.
 
#define PHAL_T1T_WRITENOERASEBYTE_RESP_LEN   2U
 T1T Write_NE response len.
 
#define PHAL_T1T_READSEG_RESP_LEN   129U
 T1T RSEG response len.
 
#define PHAL_T1T_READBLOCK_RESP_LEN   9U
 T1T Read8 response len.
 
#define PHAL_T1T_WRITEERASEBLOCK_RESP_LEN   9U
 T1T Write_E8 response len.
 
#define PHAL_T1T_WRITENOERASEBLOCK_RESP_LEN   9U
 T1T Write_NE8 response len.
 
#define PHAL_T1T_CMD_READUID   0x78U
 T1T RID command byte.
 
#define PHAL_T1T_CMD_READALL   0x00U
 T1T RALL command byte.
 
#define PHAL_T1T_CMD_READBYTE   0x01U
 T1T Read command byte.
 
#define PHAL_T1T_CMD_WRITEERASEBYTE   0x53U
 T1T Write_E8 command byte.
 
#define PHAL_T1T_CMD_WRITENOERASEBYTE   0x1AU
 T1T Write_NE8 command byte.
 
#define PHAL_T1T_CMD_READSEG   0x10U
 T1T RID command byte.
 
#define PHAL_T1T_CMD_READBLOCK   0x02U
 T1T Read8 command byte.
 
#define PHAL_T1T_CMD_WRITEERASEBLOCK   0x54U
 T1T Write_E8 command byte.
 
#define PHAL_T1T_CMD_WRITENOERASEBLOCK   0x1BU
 T1T Write_NE8 command byte. More...
 
#define PHAL_T1T_HEADER_ROM0   0x10U
 T1T Header Rom 0 byte to check. More...
 
#define PHAL_T1T_SW_READ_TIME_US   91U
 Read commands timeout in microseconds. More...
 
#define PHAL_T1T_SW_WRITE_ERASE_TIME_US   5236U
 Write Erase commands timeout in microseconds. More...
 
#define PHAL_T1T_SW_WRITE_NO_ERASE_TIME_US   2659U
 Write No Erase commands timeout in microseconds. More...
 
#define PHAL_T1T_SW_EXT_TIME_US   200U
 Time extension in microseconds. More...
 
#define PHBAL_REG_SERIALWIN_RX_TIMEOUT_VAL   500
 Default timeout value to guarantee no deadlocks (ReadBus & WriteBus)
 
#define PHPAL_I14443P3A_REQUEST_CMD   0x26U
 ReqA Command code.
 
#define PHPAL_I14443P3A_WAKEUP_CMD   0x52U
 WupA Command code.
 
#define PHPAL_I14443P3A_HALT_CMD   0x50U
 HltA Command code.
 
#define PHPAL_I14443P3A_CASCADE_TAG   0x88U
 Cascade Tag (CT) value.
 
#define PHPAL_I14443P3A_ATQA_LENGTH   2U
 Length of AtqA.
 
#define PHPAL_I14443P3A_SELECTION_TIME_US   85U
 Wait time for selection command in microseconds.
 
#define PHPAL_I14443P3A_HALT_TIME_US   1100U
 Wait time for halt command in microseconds.
 
#define PHPAL_I14443P3A_EXT_TIME_US   60
 Time extension in microseconds for all commands. More...
 
#define PHPAL_I14443P3B_SW_ATQB_TIME_US   600
 TR0 + TR1 (ISO14443-2 9.2.5 75,5 + 94,4 ~ 170 –> set 200 us). More...
 
#define PHPAL_I14443P3B_SW_DELTA_POLL   17
 T(B,POLL) (Digital Protocol Ver1.1 (Article 7.9.1.5) is 16.4ms = ~17ms). More...
 
#define PHPAL_I14443P3B_SW_ATTRIB_TIME_US   4800
 Answer to ATTRIB FWT (ISO14443-3 7.9.4.3). More...
 
#define PHPAL_I14443P3B_SW_APF   0x05U
 Anticollision prefix code.
 
#define PHPAL_I14443P3B_SW_PARAM_WUP_BIT   0x08U
 Wakeup bit within PARAM byte.
 
#define PHPAL_I14443P3B_SW_PARAM_EXTATQB_BIT   0x10U
 Extended ATQB bit within PARAM byte.
 
#define PHPAL_I14443P3B_SW_HALT_CMD   0x50U
 HltB Command code.
 
#define PHPAL_I14443P3B_SW_HALT_RESP   0x00U
 HltB Response code.
 
#define PHPAL_I14443P3B_SW_ATTRIB_CMD   0x1DU
 ATTRIB Command code.
 
#define PHPAL_I14443P3B_SW_ATTRIB_PARAM1_DEFAULT   0x00U
 ATTRIB parameter1 default value.
 
#define PHPAL_I14443P3B_SW_FWI_DEFAULT   0x04U
 FWI default value.
 
#define PHPAL_I14443P3B_SW_SFGI_DEFAULT   0x00U
 SFGI default value.
 
#define PHPAL_I14443P3B_SW_FSCI_DEFAULT   0x02U
 FSCI default value.
 
#define PHPAL_I14443P3B_SW_FWT_MIN_US   303
 FTW min in microseconds.
 
#define PHPAL_I14443P3B_SW_EXT_TIME_US   63
 Time extension in microseconds for all commands. More...
 
#define PHPAL_I14443P3B_FRAMESIZE_MAX   12
 The maximum allowed FSDI/FSCI value. More...
 
#define PHPAL_I14443P3B_SW_TXWAIT_US_TR2_0   133U
 Minimum TxWait in case received TR2 value is (00)b. More...
 
#define PHPAL_I14443P3B_SW_TXWAIT_US_TR2_1   246U
 Minimum TxWait in case received TR2 value is (01)b. More...
 
#define PHPAL_I14443P3B_SW_TXWAIT_US_TR2_2   397U
 Minimum TxWait in case received TR2 value is (10)b. More...
 
#define PHPAL_I14443P3B_SW_TXWAIT_US_TR2_3   699U
 Minimum TxWait in case received TR2 value is (11)b. More...
 
#define PHPAL_I14443P3B_SW_MINIMUM_TR2_MASK   0x06U
 Minimum TR2 Mask to extract TR2 value. More...
 
#define PHPAL_I14443P3B_SW_MINIMUM_TR2_POS   1U
 TR2 position. More...
 
#define PHPAL_I14443P3B_SW_MINIMUM_TR2_VALUE_0   0U
 TR2 bit value (00)b. More...
 
#define PHPAL_I14443P3B_SW_MINIMUM_TR2_VALUE_1   1U
 TR2 bit value (01)b. More...
 
#define PHPAL_I14443P3B_SW_MINIMUM_TR2_VALUE_2   2U
 TR2 bit value (10)b. More...
 
#define PHPAL_I14443P3B_SW_MINIMUM_TR2_VALUE_3   3U
 TR2 bit value (11)b. More...
 
#define PHPAL_I14443P3B_SW_DELTA_TPCD_US_MAX   16400U
 Delta TPCD max in microseconds.
 
#define PHPAL_I14443P3B_SW_DELTA_TPCD_US_MIN   0U
 Delta TPCD minimum in microseconds.
 
#define PHPAL_I14443P3B_SW_DELTA_FWT_US   3625U
 Delta frame wait time (FWT) in microseconds = 49152/fc.
 
#define PHPAL_I14443P3B_SW_DELTA_TPCD_US   1000U
 Delta TPCD used for exchange (in microseconds)
 
#define PHPAL_I14443P4_SW_BLOCK_MASK   0xC0U
 ISO 14443-4 Block Mask.
 
#define PHPAL_I14443P4_SW_I_BLOCK   0x00U
 ISO 14443-4 I-Block.
 
#define PHPAL_I14443P4_SW_I_BLOCK_RFU_MASK   0x22U
 ISO 14443-4 I-Block RFU mask.
 
#define PHPAL_I14443P4_SW_I_BLOCK_RFU_BITS   0x02U
 ISO 14443-4 I-Block RFU bits.
 
#define PHPAL_I14443P4_SW_R_BLOCK   0x80U
 ISO 14443-4 R-Block.
 
#define PHPAL_I14443P4_SW_R_BLOCK_RFU_MASK   0x26U
 ISO 14443-4 R-Block RFU mask.
 
#define PHPAL_I14443P4_SW_R_BLOCK_RFU_BITS   0x22U
 ISO 14443-4 R-Block RFU bits.
 
#define PHPAL_I14443P4_SW_S_BLOCK   0xC0U
 ISO 14443-4 S-Block.
 
#define PHPAL_I14443P4_SW_S_BLOCK_RFU_MASK   0x03U
 ISO 14443-4 S-Block RFU mask.
 
#define PHPAL_I14443P4_SW_S_BLOCK_RFU_BITS   0x02U
 ISO 14443-4 S-Block RFU bits.
 
#define PHPAL_I14443P4_SW_PCB_POS   0x00U
 Byte position of PCB byte.
 
#define PHPAL_I14443P4_SW_PCB_BLOCKNR   0x01U
 Blocknumber Bit within PCB.
 
#define PHPAL_I14443P4_SW_PCB_NAD_FOLLOWING   0x04U
 Bit within PCB which signals presence of NAD byte.
 
#define PHPAL_I14443P4_SW_PCB_CID_FOLLOWING   0x08U
 Bit within PCB which signals presence of CID byte.
 
#define PHPAL_I14443P4_SW_PCB_CHAINING   0x10U
 Bit within PCB which signals chaining.
 
#define PHPAL_I14443P4_SW_PCB_ACK   0x00U
 Bit within PCB which signals ACK.
 
#define PHPAL_I14443P4_SW_PCB_NAK   0x10U
 Bit within PCB which signals NAK.
 
#define PHPAL_I14443P4_SW_PCB_DESELECT   0x00U
 Bits within PCB which signal a DESELECT command.
 
#define PHPAL_I14443P4_SW_PCB_WTX   0x30U
 Bits within PCB which signal a WTX command.
 
#define PHPAL_I14443P4_SW_WTXM_BITS   0x3FU
 WTXM Bits of WTX INF byte.
 
#define PHPAL_I14443P4_SW_FWI_DEFAULT   0x04U
 FWI default value.
 
#define PHPAL_I14443P4_SW_FSCI_DEFAULT   0x02U
 FSCI default value.
 
#define PHPAL_I14443P4_SW_FWT_MIN_US   302
 FTW min in microseconds.
 
#define PHPAL_I14443P4_SW_FWT_MIN_US   302
 FTW min in microseconds.
 
#define PHPAL_I14443P4_SW_FWT_MAX_US   4949000
 FTW max in microseconds.
 
#define PHPAL_I14443P4_SW_FWT_DESELECT_US   5286
 S(DESELECT) FTW in microseconds.
 
#define PHPAL_I14443P4_SW_CID_MASK   0x0FU
 Valid CID bits within CID field.
 
#define PHPAL_I14443P4_SW_STATE_I_BLOCK_TX   0x01U
 I-Block transmission mode.
 
#define PHPAL_I14443P4_SW_STATE_I_BLOCK_RX   0x02U
 I-Block reception mode.
 
#define PHPAL_I14443P4_SW_STATE_FINISHED   0x0FU
 Exchange finished mode.
 
#define PHPAL_I14443P4_SW_STATE_RETRANSMIT_BIT   0x40U
 An I-Block mode is retramsmitting.
 
#define PHPAL_I14443P4_SW_STATE_CHAINING_BIT   0x80U
 An I-Block mode is chaining.
 
#define PHPAL_I14443P4_SW_STATE_MASK   0x0FU
 Only 6 bits of the state are pure state codes.
 
#define PHPAL_I14443P4_SW_MAX_RETRIES_DEFAULT   2U
 Default Maximum Retry count for ISO/IEC 14443-4:2008(E) Rule 4 and 5.
 
#define PHPAL_I14443P4_EXT_TIME_US   60
 Time extension in microseconds for all commands. More...
 
#define PHPAL_I14443P4_EMVCO_FWT_US   30
 EMVCo: Time extension to support EMVCO Req.
 
#define PHPAL_I14443P4_SW_S_BLOCK_INF_PLI_MASK   0xC0
 Power level Indication bit mask for INF of SWTX.
 
#define PHPAL_I14443P4_SW_DELTA_TPCD_US_MAX   16400U
 Delta TPCD max in microseconds.
 
#define PHPAL_I14443P4_SW_DELTA_TPCD_US_MIN   0U
 Delta TPCD minimum in microseconds.
 
#define PHPAL_I14443P4_SW_DELTA_FWT_US   3625U
 Delta frame wait time (FWT) in microseconds = 49152/fc.
 
#define PHPAL_I14443P4_SW_DELTA_TPCD_US   1000U
 Delta TPCD used for exchange (in microseconds)
 
#define PHPAL_I14443P4A_SAMAV2_X_PPSS   0xD0U
 PPS Command code. More...
 
#define PHPAL_I14443P4A_SAMAV2_X_PPS0   0x11U
 PPS0 code. More...
 
#define PHPAL_I14443P4A_SAMAV2_X_ATS_LEN   0
 Position of LEN within ATS. More...
 
#define PHPAL_I14443P4A_SAMAV2_X_ATS_T0   1
 Position of T0 within ATS. More...
 
#define PHPAL_I14443P4A_SAMAV2_X_ATS_TA1_PRESENT   0x10U
 Bit which signals TA(1) presence. More...
 
#define PHPAL_I14443P4A_SAMAV2_X_ATS_TB1_PRESENT   0x20U
 Bit which signals TB(1) presence. More...
 
#define PHPAL_I14443P4A_SAMAV2_X_ATS_TC1_PRESENT   0x40U
 Bit which signals TC(1) presence. More...
 
#define PHPAL_I14443P4A_SAMAV2_X_ATS_TC1_NAD_SUPPORT   0x01U
 Bit within TC(1) which signals NAD support. More...
 
#define PHPAL_I14443P4A_SAMAV2_X_ATS_TC1_CID_SUPPORT   0x02U
 Bit within TC(1) which signals CID support. More...
 
#define PHPAL_I14443P4A_SAMAV2_X_FWI_DEFAULT   0x04U
 FWI default value. More...
 
#define PHPAL_I14443P4A_SAMAV2_X_FSCI_DEFAULT   0x02U
 FSCI default value. More...
 
#define PHPAL_I14443P4A_SW_HALT_CMD   0x50U
 HltA Command code. More...
 
#define PHPAL_I14443P4A_SW_RATS   0xE0U
 Rats Command code. More...
 
#define PHPAL_I14443P4A_SW_PPSS   0xD0U
 PPS Command code. More...
 
#define PHPAL_I14443P4A_SW_PPS0   0x11U
 PPS0 code. More...
 
#define PHPAL_I14443P4A_SW_S_BLOCK   0xC0U
 ISO 14443-4 S-Block. More...
 
#define PHPAL_I14443P4A_SW_S_BLOCK_RFU_BITS   0x02U
 ISO 14443-4 S-Block RFU bits. More...
 
#define PHPAL_I14443P4A_SW_PCB_CID_FOLLOWING   0x08U
 Bit within PCB which signals presence of CID byte . More...
 
#define PHPAL_I14443P4A_SW_PCB_DESELECT   0x00U
 Bits within PCB which signal a DESELECT command. More...
 
#define PHPAL_I14443P4A_SW_FWT_ACTIVATION_US   5286
 Activation FTW in microseconds. More...
 
#define PHPAL_I14443P4A_SW_ATS_T0   1
 Position of T0 within ATS. More...
 
#define PHPAL_I14443P4A_SW_ATS_TA1_PRESENT   0x10U
 Bit which signals TA(1) presence. More...
 
#define PHPAL_I14443P4A_SW_ATS_TB1_PRESENT   0x20U
 Bit which signals TB(1) presence. More...
 
#define PHPAL_I14443P4A_SW_ATS_TC1_PRESENT   0x40U
 Bit which signals TC(1) presence. More...
 
#define PHPAL_I14443P4A_SW_ATS_TC1_NAD_SUPPORT   0x01U
 Bit within TC(1) which signals NAD support. More...
 
#define PHPAL_I14443P4A_SW_ATS_TC1_CID_SUPPORT   0x02U
 Bit within TC(1) which signals CID support. More...
 
#define PHPAL_I14443P4A_SW_FWI_DEFAULT   0x04U
 FWI default value. More...
 
#define PHPAL_I14443P4A_SW_SFGI_DEFAULT   0x00U
 SFGI default value. More...
 
#define PHPAL_I14443P4A_SW_FSCI_DEFAULT   0x02U
 FSCI default value. More...
 
#define PHPAL_I14443P4A_SW_FWT_MIN_US   303
 FTW min in microseconds. More...
 
#define PHPAL_I14443P4A_SW_HALT_TIME_US   1100U
 Wait time for halt command in microseconds. More...
 
#define PHPAL_I14443P4A_SW_EXT_TIME_US   60
 Time extension in microseconds for all commands. More...
 
#define PHPAL_I14443P4A_FRAMESIZE_MAX   12
 The maximum allowed FSDI/FSCI value as per ISO. More...
 
#define PHPAL_I14443P4A_EMVCO_FRAMESIZE_MAX   8
 The maximum allowed FSDI/FSCI value as per Emvco and NfcForum. More...
 
#define PHPAL_I14443P4A_SW_DELTA_TPCD_US_MAX   16400U
 Delta TPCD max in microseconds.
 
#define PHPAL_I14443P4A_SW_DELTA_TPCD_US_MIN   0U
 Delta TPCD minimum in microseconds.
 
#define PHPAL_I14443P4A_SW_DELTA_FWT_US   3625U
 Delta frame wait time (FWT) in microseconds = 49152/fc.
 
#define PHPAL_I14443P4A_SW_DELTA_TPCD_US   1000U
 Delta TPCD used for exchange (in microseconds)
 
#define PHPAL_I18092MPI_SW_IS_INVALID_BLOCK_STATUS(bStatus)
 Macro which checks for invalid block status. More...
 
#define PHPAL_I18092MPI_SW_IS_TIMEOUT(bPfb)
 Macro which checks if given PDU is timeout PDU. More...
 
#define PHPAL_I18092MPI_SW_IS_ATTENTION(bPfb)
 Macro which checks if given PDU is ATN PDU. More...
 
#define PHPAL_I18092MPI_SW_IS_ACK(bPfb)
 Macro which checks if given PDU is ACK PDU. More...
 
#define PHPAL_I18092MPI_SW_IS_NACK(bPfb)
 Macro which checks if given PDU is NACK PDU. More...
 
#define PHPAL_I18092MPI_SW_IS_CHAINING(bPfb)
 Macro which checks if given I-PDU is chaining. More...
 
#define PHPAL_I18092MPI_SW_IS_NOT_CHAINING(bPfb)
 Macro which checks if given I-PDU is not chaining. More...
 
#define PHPAL_I18092MPI_SW_IS_INFORMATION_PDU(bPfb)
 Macro which checks if given PDU is an I-PDU. More...
 
#define PHPAL_I18092MPI_SW_INCREMENT_PNI(bPni)   (((bPni) == 3) ? 0 : ((bPni) + 1))
 Macro used to increment PNI. More...
 
#define PHPAL_I18092MPI_SW_START_BYTE   0xF0U
 Start Byte to be added to the protocol header in case underlying protocol is ISO14443. More...
 
#define PHPAL_I18092MPI_SW_CMD_REQUEST   0xD4U
 Request command code. More...
 
#define PHPAL_I18092MPI_SW_CMD_RESPONSE   0xD5U
 Response command code. More...
 
#define PHPAL_I18092MPI_SW_CMD_ATR_REQ   0x00U
 Attribute request command code. More...
 
#define PHPAL_I18092MPI_SW_ATR_PPI_LRI_BIT   0x04U
 Bit position of LRi field within PPi byte for attribute request command. More...
 
#define PHPAL_I18092MPI_SW_CMD_ATR_RES   0x01U
 Attribute response command code. More...
 
#define PHPAL_I18092MPI_SW_CMD_PSL_REQ   0x04U
 Parameter select request command code. More...
 
#define PHPAL_I18092MPI_SW_CMD_PSL_RES   0x05U
 Parameter select response command code. More...
 
#define PHPAL_I18092MPI_SW_CMD_DEP_REQ   0x06U
 Data exchange protocol request command code. More...
 
#define PHPAL_I18092MPI_SW_CMD_DEP_RES   0x07U
 Data exchange protocol response command code. More...
 
#define PHPAL_I18092MPI_SW_CMD_DSL_REQ   0x08U
 Deselect request command code. More...
 
#define PHPAL_I18092MPI_SW_CMD_DSL_RES   0x09U
 Deselect response command code. More...
 
#define PHPAL_I18092MPI_SW_CMD_RLS_REQ   0x0AU
 Release request command code. More...
 
#define PHPAL_I18092MPI_SW_CMD_RLS_RES   0x0BU
 Release response command code. More...
 
#define PHPAL_I18092MPI_SW_CMD_WUP_REQ   0x02U
 Wakeup request command code. More...
 
#define PHPAL_I18092MPI_SW_CMD_WUP_RES   0x03U
 Wakeup response command code. More...
 
#define PHPAL_I18092MPI_SW_ATR_RES_NFCID3_POS   0x02U
 Position of NFCID3 within ATR_RES. More...
 
#define PHPAL_I18092MPI_SW_ATR_RES_DID_POS   12U
 Position of DID within ATR_RES. More...
 
#define PHPAL_I18092MPI_SW_ATR_RES_BST_POS   13U
 Position of BS(T) within ATR_RES. More...
 
#define PHPAL_I18092MPI_SW_ATR_RES_BRT_POS   14U
 Position of BR(T) within ATR_RES. More...
 
#define PHPAL_I18092MPI_SW_ATR_RES_TO_POS   15U
 Position of TO within ATR_RES. More...
 
#define PHPAL_I18092MPI_SW_ATR_RES_PPT_POS   16U
 Position of PP(T) within ATR_RES. More...
 
#define PHPAL_I18092MPI_SW_ATR_RES_PPT_GT_AVAILABLE   0x02U
 Gt_available bit within PP(T) byte of ATR_RES. More...
 
#define PHPAL_I18092MPI_SW_ATR_RES_PPT_NAD_USED   0x01U
 NAD_used bit within PP(T) byte of ATR_RES. More...
 
#define PHPAL_I18092MPI_SW_PFB_INFORMATION_PDU_MASK   0x00U
 Bit mask within PFB identifying an information PDU. More...
 
#define PHPAL_I18092MPI_SW_PFB_ACK_PDU_MASK   0x40U
 Bit mask within PFB identifying an ACK/NACK PDU. More...
 
#define PHPAL_I18092MPI_SW_PFB_SUPERVISORY_PDU_MASK   0x80U
 Bit mask within PFB identifying a supervisory PDU. More...
 
#define PHPAL_I18092MPI_SW_PFB_PDU_TYPE_MASK   0xE0U
 Bit mask within PFB to get type of PDU. More...
 
#define PHPAL_I18092MPI_SW_PFB_NAD_MASK   0x08U
 Bit mask within PFB for checking NAD enabler. More...
 
#define PHPAL_I18092MPI_SW_PFB_DID_MASK   0x04U
 Bit mask within PFB for checking DID enabler. More...
 
#define PHPAL_I18092MPI_SW_PFB_PNI_MASK   0x03U
 Bit mask within PFB for getting PNI. More...
 
#define PHPAL_I18092MPI_SW_PFB_OPTION_MASK   0x10U
 Bit mask within PDU for getting option field (NACK/ACK or ATTENTION/RTOS or MI). More...
 
#define PHPAL_I18092MPI_SW_DELTA_T_INITIATOR_MS   100U
 Activation response waiting time in milliseconds, NFCForum-TS-DigitalProtocol-1.0 section A.10. More...
 
#define PHPAL_I18092MPI_SW_DELTA_RWT_US   2U
 Time extension in microseconds for all commands, NFCForum-TS-DigitalProtocol-1.0 section A.10. More...
 
#define PHPAL_I18092MPI_SW_RWT_ACTIVATION_MS   1239U
 Activation response waiting time in milliseconds, NFCForum-TS-DigitalProtocol-1.0 section A.10. More...
 
#define PHPAL_I18092MPI_SW_RWT_MIN_US   302U
 Minimum response waiting time, ISO/IEC 18092:2004(E) section 12.5.1.2.1. More...
 
#define PHPAL_I18092MPI_SW_RWT_MAX_MS   4949UL
 Maximum response waiting time, ISO/IEC 18092:2013(E) section 12.5.1.2.1.
 
#define PHPAL_I18092MPI_SW_TIRFG_MIN_MS   5U
 Minimum initial RF guard time before retry of ATR_REQ. More...
 
#define PHPAL_I18092MPI_SW_MIN_FRAMESIZE   3U
 Minimum frame size, NFCForum-TS-DigitalProtocol-1.0. More...
 
#define PHPAL_I18092MPI_SW_MAX_FRAMESIZE   255U
 Maximum frame size, NFCForum-TS-DigitalProtocol-1.0. More...
 
#define PHPAL_I18092MPI_SW_RETRIES_DEFAULT   2U
 Default (=minimum) Maximum Retry count, NFCForum-TS-DigitalProtocol-1.0 section A.10. More...
 
#define PHPAL_I18092MPI_SW_MIN_ACTIVATION_FRAME_LENGTH   17U
 Frame length must be min. More...
 
#define PHPAL_I18092MPI_SW_MAX_ACTIVATION_FRAME_LENGTH   64U
 Frame length is limited to 64 bytes during activation. More...
 
#define PHPAL_I18092MPI_SW_STATE_INFORMATION_PDU_TX   0x00U
 State information PDU to be transmitted. More...
 
#define PHPAL_I18092MPI_SW_STATE_ACK_PDU_TX   0x01U
 State ACK PDU to be transmitted. More...
 
#define PHPAL_I18092MPI_SW_STATE_INFORMATION_PDU_RX   0x02U
 State information PDU to be received. More...
 
#define PHPAL_I18092MPI_SW_STATE_FINISHED   0x03U
 Finished state. More...
 
#define PHPAL_I18092MPI_SW_STATE_MASK   0x0FU
 State mask. More...
 
#define PHPAL_I18092MPI_SW_STATE_RETRANSMIT_BIT   0x10U
 Retransmission of information PDU. More...
 
#define PHPAL_I18092MPI_SW_STATE_CHAINING_BIT   0x20U
 Information PDU is chaining. More...
 
#define PHPAL_I18092MPI_SW_STATE_CHAINING_FIRST_BIT   0x40U
 Information PDU is first block in chain. More...
 
#define PHPAL_I18092MPI_SW_STATE_CHAINING_LAST_BIT   0x80U
 Information PDU is last block in chain. More...
 
#define PHPAL_I18092MPI_SW_MAX_HEADER_LENGTH   0x07U
 Max length of the Header.
 
#define PHPAL_I18092MPI_SW_RTOX_PAYLOAD_LENGTH   0x01U
 RTOX Data length.
 
#define PHPAL_I18092MPI_SW_RTOX_MIN_VALUE   0x01U
 RTOX Minimum Valid value.
 
#define PHPAL_I18092MPI_SW_RTOX_MAX_VALUE   0x3BU
 RTOX Maximum Valid value.
 
#define PHPAL_MIFARE_RESP_ACK   0x0A
 MIFARE ACK response code.
 
#define PHPAL_MIFARE_RESP_NAK0   0x00
 MIFARE NAK0 response code.
 
#define PHPAL_MIFARE_RESP_NAK1   0x01
 MIFARE NAK1 response code.
 
#define PHPAL_MIFARE_RESP_NAK4   0x04
 MIFARE NAK4 response code.
 
#define PHPAL_MIFARE_RESP_NAK5   0x05
 MIFARE NAK5 response code.
 
#define PHPAL_MIFARE_RESP_NAK6   0x06
 MIFARE NAK6 response code.
 
#define PHPAL_MIFARE_RESP_NAK7   0x07
 MIFARE NAK7 response code.
 
#define PHPAL_MIFARE_RESP_NAK9   0x09
 MIFARE NAK9 response code.
 

Functions

phStatus_t phalI18000p3m3_Sw_ParseError (phalI18000p3m3_Sw_DataParams_t *pDataParams, uint8_t *pRxData, uint16_t wRxDataLength, uint8_t bRxLastBits)
 Parse received error frame. More...
 
phStatus_t phalMfc_Int_Transfer (void *pPalMifareDataParams, uint8_t bBlockNo)
 Perform MIFARE(R) Transfer command with MIFARE Picc. More...
 
phStatus_t phalMfc_Int_Value (void *pPalMifareDataParams, uint8_t bCmdCode, uint8_t bBlockNo, uint8_t *pValue)
 Perform a MIFARE(R) Value operation with MIFARE Picc. More...
 
phStatus_t phalMfc_Int_CreateValueBlock (uint8_t *pValue, uint8_t bAddrData, uint8_t *pBlock)
 Create a Value block for a given value/addr pair. More...
 
phStatus_t phalMfc_Int_CheckValueBlockFormat (uint8_t *pBlock)
 Check value block format of a given block. More...
 
phStatus_t phalMfc_Int_ResolveReturnCode (uint8_t bRetCode)
 Resolve MIFARE(R) error code from response. More...
 
phStatus_t phalMfc_SamAV2_X_ConvertNak (phStatus_t status)
 Convert HAL Nak codes into palMifare NAK codes. More...
 
phStatus_t phalMfp_Int_ComputeErrorResponse (uint16_t wNumBytesReceived, uint8_t bStatus, uint8_t bLayer4Comm)
 Evaluate if the received response is erroneus. More...
 
phStatus_t phalMfp_Int_WritePerso (void *pPalMifareDataParams, uint8_t bLayer4Comm, uint16_t wBlockNr, uint8_t *pValue)
 Perform a MIFARE Plus Write Perso command. More...
 
phStatus_t phalMfp_Int_CommitPerso (void *pPalMifareDataParams, uint8_t bLayer4Comm)
 Perform a MIFARE Plus Commit Perso command. More...
 
phStatus_t phalMfp_Int_ResetAuth (void *pPalMifareDataParams)
 Perform a MIFARE Plus Reset Authenticate command. More...
 
phStatus_t phalMfp_Int_PrepareProximityCheck (void *pPalMifareDataParams)
 Perform a Prepare Proximity Check command. More...
 
phStatus_t phalMfp_Int_ProximityCheck (void *pPalMifareDataParams, uint8_t bNumSteps, uint8_t *pRndC, uint8_t *pRndRC)
 Perform a Proximity Check command. More...
 
phStatus_t phalMfp_Int_MultiBlockRead (void *pPalMifareDataParams, uint8_t bBlockNr, uint8_t bNumBlocks, uint8_t *pBlocks)
 Perform a Multi Block Read command. More...
 
phStatus_t phalMfp_Int_MultiBlockWrite (void *pPalMifareDataParams, uint8_t bBlockNr, uint8_t bNumBlocks, uint8_t *pBlocks)
 Perform a Multi Block Write command. More...
 
phStatus_t phalMfp_Int_CreateValueBlock (uint8_t *pValue, uint8_t bAddrData, uint8_t *pBlock)
 Create a Value block for a given value/addr pair. More...
 
phStatus_t phalMfp_Int_CheckValueBlockFormat (uint8_t *pBlock)
 Check value block format of a given block. More...
 
phStatus_t phalMfp_SamAV2_AuthenticateGeneral (phalMfp_SamAV2_DataParams_t *pDataParams, uint8_t bLayer4Comm, uint8_t bFirstAuth, uint16_t wBlockNr, uint16_t wKeyNumber, uint16_t wKeyVersion, uint8_t bLenDivInput, uint8_t *pDivInput, uint8_t bUseKdfSl2, uint8_t bLenPcdCap2, uint8_t *pPcdCap2In, uint8_t *pPcdCap2Out, uint8_t *pPdCap2)
 Perform a complete MIFARE Plus Authentication for either Security Level. More...
 
phStatus_t phalMfp_SamAV2_WriteExt (phalMfp_SamAV2_DataParams_t *pDataParams, uint8_t bCmdCode, uint16_t wSrcBnr, uint16_t wDstBnr, uint8_t *pData, uint8_t bDataLength)
 Perform a Write command in all it's flavours. More...
 
phStatus_t phalMfp_SamAV2_X_WriteExt (phalMfp_SamAV2_X_DataParams_t *pDataParams, uint8_t bCmdCode, uint16_t wSrcBnr, uint16_t wDstBnr, uint8_t *pData, uint8_t bDataLength)
 Perform a Write command in all it's flavours. More...
 
phStatus_t phalMfp_SamAV2_X_ConvertNak (phStatus_t status)
 Convert HAL Nak codes into palMifare NAK codes. More...
 
phStatus_t phalMfp_Sw_AuthenticateGeneral (phalMfp_Sw_DataParams_t *pDataParams, uint8_t bLayer4Comm, uint8_t bFirstAuth, uint16_t wBlockNr, uint16_t wKeyNumber, uint16_t wKeyVersion, uint8_t bLenDivInput, uint8_t *pDivInput, uint8_t bUseKdfSl2, uint8_t bLenPcdCap2, uint8_t *pPcdCap2In, uint8_t *pPcdCap2Out, uint8_t *pPdCap2)
 Perform a complete MIFARE Plus Authentication for either Security Level. More...
 
phStatus_t phalMfp_Sw_WriteExt (phalMfp_Sw_DataParams_t *pDataParams, uint8_t bCmdCode, uint16_t wSrcBnr, uint16_t wDstBnr, uint8_t *pData, uint16_t wDataLength, uint8_t bEncrypted)
 Perform a Write command in all it's flavours. More...
 
phStatus_t phalMfp_Sw_Int_ComputeIv (uint8_t bIsResponse, uint8_t *pTi, uint16_t wRCtr, uint16_t wWCtr, uint8_t *pIv)
 Calculate the Init-Vector for encryption from input data. More...
 
phStatus_t phalMfp_Sw_Int_KdfSl2 (phalMfp_Sw_DataParams_t *pDataParams, uint8_t *pRndA, uint8_t *pRndB)
 Perform a SL2 Key Derivation Function. More...
 
phStatus_t phalMfp_Sw_Int_KdfSl3 (phalMfp_Sw_DataParams_t *pDataParams, uint8_t *pRndA, uint8_t *pRndB)
 Perform a SL3 Key Derivation Function. More...
 
void phalMfp_Sw_Int_TruncateMac (uint8_t *pMac, uint8_t *pTruncatedMac)
 Perform MIFARE Plus specific MAC truncation. More...
 
phStatus_t phbalReg_SerialWin_SetMode (void *phPort, uint32_t dwBitRate, uint8_t bStopBits)
 Change host bit rate. More...
 
phStatus_t phbalReg_SerialWin_SetTimeout (void *phPort, uint32_t dwTimeout)
 Change reception timeout. More...
 
phStatus_t phKeyStore_Sw_GetKeyValuePtrPos (phKeyStore_Sw_DataParams_t *pDataParams, uint16_t wKeyNumber, uint16_t wPos, phKeyStore_Sw_KeyVersionPair_t **pKeyVersion)
 Get the pointer to a KeyValue Pair given a Key number and a Key position. More...
 
phStatus_t phKeyStore_Sw_GetKeyValuePtrVersion (phKeyStore_Sw_DataParams_t *pDataParams, uint16_t wKeyNumber, uint16_t wKeyVersion, phKeyStore_Sw_KeyVersionPair_t **pKeyVersion)
 Get the pointer to a KeyValue Pair given a Key number and a KeyVersion. More...
 
phStatus_t phKeyStore_Sw_CheckUpdateKUC (phKeyStore_Sw_DataParams_t *pDataParams, uint16_t wKeyUsageCtrNumber)
 Check value of a counter and increment it accordingly. More...
 
phLog_RegisterEntry_t * phLog_GetRegisteredEntry (void *pDataParams)
 Retreive phLog_RegisterEntry_t corresponding to given DataParams pointer. More...
 
void phLog_AddParam_Raw (void *pDataParams, uint8_t bLogType, const char *pName, const void *pParam, uint16_t wLength, uint8_t bDataType)
 Add a new log entry containing raw data. More...
 
phStatus_t phpalI14443p3a_Sw_RequestAEx (phpalI14443p3a_Sw_DataParams_t *pDataParams, uint8_t bReqCode, uint8_t *pAtqa)
 Perform a ISO14443-3A Request or Wakeup command. More...
 
phStatus_t phpalI14443p3b_Sw_RequestBEx (phpalI14443p3b_Sw_DataParams_t *pDataParams, uint8_t bIsWakeUp, uint8_t bNumSlots, uint8_t bAfi, uint8_t bExtAtqb, uint8_t *pAtqb, uint8_t *pAtqbLen)
 Perform a ISO14443-3B Request/Wakeup command. More...
 
phStatus_t phpalI14443p3b_Sw_CheckATQBEx (phpalI14443p3b_Sw_DataParams_t *pDataParams, uint8_t *pResp, uint16_t wRespLength, uint8_t *pAtqb, uint8_t *pAtqbLen)
 Check the received answer to Request/Wakeup/SlotMarker command. More...
 
phStatus_t phpalI14443p3b_Sw_SetReaderBaudRateEx (phpalI14443p3b_Sw_DataParams_t *pDataParams)
 Set the baud rate on the reader device. More...
 
phStatus_t phpalI14443p3b_Sw_DecideBaudRateEx (uint8_t bBitRateCapability, uint8_t *pbDri, uint8_t *pbDsi)
 Decide which baud rate to use depending on the VICCs capabilities and the callers request. More...
 
phStatus_t phpalI14443p4_Sw_BuildIBlock (uint8_t bCidEnabled, uint8_t bCid, uint8_t bNadEnabled, uint8_t bNad, uint8_t bPcbBlockNum, uint8_t bChaining, uint8_t *pTxBuffer, uint16_t *pTxLength)
 Build I-Block frame header. More...
 
phStatus_t phpalI14443p4_Sw_BuildRBlock (uint8_t bCidEnabled, uint8_t bCid, uint8_t bPcbBlockNum, uint8_t bIsAck, uint8_t *pTxBuffer, uint16_t *pTxLength)
 Build R(ACK) / R(NAK) frames. More...
 
phStatus_t phpalI14443p4_Sw_BuildSBlock (uint8_t bCidEnabled, uint8_t bCid, uint8_t bIsWtx, uint8_t bWtxm, uint8_t *pTxBuffer, uint16_t *pTxLength)
 Build S-Block frames. More...
 
phStatus_t phpalI14443p4_Sw_IsValidIBlock (uint8_t bCheckCid, uint8_t bCid, uint8_t bCheckNad, uint8_t bNad, uint8_t *pRxBuffer, uint16_t wRxLength)
 Check if received I-Block is valid. More...
 
phStatus_t phpalI14443p4_Sw_IsValidRBlock (uint8_t bCheckCid, uint8_t bCid, uint8_t *pRxBuffer, uint16_t wRxLength)
 Check if received R-Block is valid. More...
 
phStatus_t phpalI14443p4_Sw_IsValidSBlock (uint8_t bCheckCid, uint8_t bCid, uint8_t *pRxBuffer, uint16_t wRxLength)
 Check if received S-Block is valid. More...
 
phStatus_t phpalI14443p4_Sw_IsoHandling (phpalI14443p4_Sw_DataParams_t *pDataParams, uint16_t wOption, uint8_t bRetryCount, uint8_t *pTxBuffer, uint16_t wTxLength, uint8_t **ppRxBuffer, uint16_t *pRxLength)
 Perform actual exchanging and take care about error handling etc. More...
 
phStatus_t phpalI18092mPI_Sw_WriteFrameHeader (phpalI18092mPI_Sw_DataParams_t *pDataParams, uint16_t wOption, uint8_t bCommandCode, uint8_t bDataLength)
 Write header of transport protocol frame to internal buffer of HAL. More...
 
phStatus_t phpalI18092mPI_Sw_WritePduHeader (phpalI18092mPI_Sw_DataParams_t *pDataParams, uint8_t bPduMask, uint8_t bOption, uint8_t bDataLength)
 Write PDU header to internal buffer of HAL. More...
 
phStatus_t phpalI18092mPI_Sw_UpdatePduHeader (phpalI18092mPI_Sw_DataParams_t *pDataParams, uint8_t bDataLength)
 Update the length field within protocol frame header. More...
 
phStatus_t phpalI18092mPI_Sw_GetPduHeaderLength (phpalI18092mPI_Sw_DataParams_t *pDataParams, uint8_t *pProtLength)
 Retrieve the length of protocol frame header. More...
 
phStatus_t phpalI18092mPI_Sw_ValidateAndNormalizeResponseFrame (phpalI18092mPI_Sw_DataParams_t *pDataParams, uint8_t *pFrame, uint16_t wFrameLength, uint8_t bExpectedResponseCode, uint8_t **ppValidatedFrame, uint16_t *pValidatedFrameLength, uint8_t **ppPayload, uint16_t *pPayloadLength)
 Basic check if the received response is a valid frame. More...
 
phStatus_t phpalI18092mPI_Sw_ConvertDatarate (uint16_t wHalDatarate, uint8_t *pI18092Datarate)
 Convert data rate read out from HAL to ISO18092 compatible data rate value (PHPAL_I18092MPI_DATARATE_*). More...
 
phStatus_t phpalI18092mPI_Sw_TransceivePdu (phpalI18092mPI_Sw_DataParams_t *pDataParams, uint16_t wOption, uint8_t *pTxBuffer, uint16_t wTxLength, uint8_t **ppRawResponse, uint16_t *pRawResponseLength, uint8_t **ppNormalizedResponse, uint16_t *pNormalizedResponseLength, uint8_t **ppPayload, uint16_t *pPayloadLength)
 Transmit PDU to target and receive response. More...
 
phStatus_t phpalI18092mPI_Sw_ValidateReceivedPdu (phpalI18092mPI_Sw_DataParams_t *pDataParams, phStatus_t statusRx, uint8_t **pRawResponse, uint16_t *wRawResponseLength, uint8_t **ppNormalizedResponse, uint16_t *pNormalizedResponseLength, uint8_t **ppPayload, uint16_t *pPayloadLength)
 Validate the status. More...
 
phStatus_t phpalMifare_SamAV2_X_ConvertNak (phStatus_t status)
 Convert HAL Nak codes into palMifare NAK codes. More...
 
phStatus_t phpalSli15693_Sw_InventoryEx (phpalSli15693_Sw_DataParams_t *pDataParams, uint8_t bOption, uint8_t bFlags, uint8_t bAfi, uint8_t *pMask, uint8_t bMaskBitLength, uint8_t bBlockNo, uint16_t wNoOfBlocks, uint8_t *pUid, uint8_t *pUidLength, uint8_t *pData, uint16_t *pLength)
 Perform all kinds of Inventory commands. More...
 
phStatus_t phpalSli15693_Sw_InventoryExt (phpalSli15693_Sw_DataParams_t *pDataParams, uint8_t bOption, uint8_t bFlags, uint8_t bAfi, uint8_t bExtended, uint8_t bExtendedOptions, uint8_t *pMask, uint8_t bMaskBitLength, uint8_t bBlockNo, uint16_t wNoOfBlocks, uint8_t *pUid, uint8_t *pUidLength, uint8_t *pData, uint16_t *pLength)
 Perform Inventory Read Extended mode. More...
 

Felica Command Codes

#define PHAL_FELICA_CMD_REQUEST_RESPONSE   0x04U
 Get the PICCs current mode. More...
 
#define PHAL_FELICA_CMD_REQUEST_SERVICE   0x02U
 Get area key version and service key version. More...
 
#define PHAL_FELICA_CMD_READ   0x06U
 Read the record value of the specified service. More...
 
#define PHAL_FELICA_CMD_WRITE   0x08U
 Write records of the specified service. More...
 
#define PHAL_FELICA_RSP_REQUEST_RESPONSE   0x05U
 Response code to the Request Response command. More...
 
#define PHAL_FELICA_RSP_REQUEST_SERVICE   0x03U
 Response code to the Request Service command. More...
 
#define PHAL_FELICA_RSP_READ   0x07U
 Response code to the Read command. More...
 
#define PHAL_FELICA_RSP_WRITE   0x09U
 Response code to the Write command. More...
 

Command Codes

#define PHAL_I18000P3M3_CMD_REQ_RN   0xC1
 ReqRn command code. More...
 
#define PHAL_I18000P3M3_CMD_READ   0xC2
 Read command code. More...
 
#define PHAL_I18000P3M3_CMD_WRITE   0xC3
 Write command code. More...
 
#define PHAL_I18000P3M3_CMD_KILL   0xC4
 Kill command code. More...
 
#define PHAL_I18000P3M3_CMD_LOCK   0xC5
 Lock command code. More...
 
#define PHAL_I18000P3M3_CMD_ACCESS   0xC6
 Access command code. More...
 
#define PHAL_I18000P3M3_CMD_BLOCKWRITE   0xC7
 BlockWrite command code. More...
 
#define PHAL_I18000P3M3_CMD_BLOCKERASE   0xC8
 BlockErase command code. More...
 
#define PHAL_I18000P3M3_CMD_BLOCKPERMALOCK   0xC9
 BlockPermaLock command code. More...
 

I180000 Error Codes

#define PHAL_I18000P3M3_ERRCODE_OTHER   0x00U
 Other Error. More...
 
#define PHAL_I18000P3M3_ERRCODE_MEMORY_OVERRUN   0x03U
 Memory overrun. More...
 
#define PHAL_I18000P3M3_ERRCODE_MEMORY_LOCKED   0x04U
 Memory locked. More...
 
#define PHAL_I18000P3M3_ERRCODE_INSUFFICIENT_POWER   0x0BU
 Insufficient power. More...
 
#define PHAL_I18000P3M3_ERRCODE_NON_SPECIFIC   0x0FU
 Non-specific error. More...
 

MIFARE Desfire Native Commands

#define PHAL_MFDF_CMD_AUTHENTICATE   0x0A
 MF DF Authenticate command. More...
 
#define PHAL_MFDF_CMD_AUTHENTICATE_ISO   0x1A
 MF DF Authenticate ISO command. More...
 
#define PHAL_MFDF_CMD_AUTHENTICATE_AES   0xAA
 MF DF Authenticate AES command. More...
 
#define PHAL_MFDF_CMD_CHANGE_KEY_SETTINGS   0x54
 MF DF Change key settings cmd. More...
 
#define PHAL_MFDF_CMD_GET_KEY_SETTINGS   0x45
 MF DF Get Key Settings Cmd. More...
 
#define PHAL_MFDF_CMD_CHANGE_KEY   0xC4
 MF DF Change key cmd. More...
 
#define PHAL_MFDF_CMD_GET_KEY_VERSION   0x64
 MF DF Get Key Version. More...
 
#define PHAL_MFDF_CMD_CREATE_APPLN   0xCA
 MF DF Create Application cmd. More...
 
#define PHAL_MFDF_CMD_DELETE_APPLN   0xDA
 MF DF Delete Application cmd. More...
 
#define PHAL_MFDF_CMD_GET_APPLN_IDS   0x6A
 MF DF Get Application Ids cmd. More...
 
#define PHAL_MFDF_CMD_GET_DF_NAMES   0x6D
 MF DF Get Dedicated Fine names cmd. More...
 
#define PHAL_MFDF_CMD_SELECT_APPLN   0x5A
 MF DF Select Application Cmd. More...
 
#define PHAL_MFDF_CMD_FORMAT_PICC   0xFC
 MF DF Format PICC Cmd. More...
 
#define PHAL_MFDF_CMD_GET_VERSION   0x60
 MF DF Get Version cmd. More...
 
#define PHAL_MFDF_CMD_FREE_MEM   0x6E
 MF DF Free Memory cmd. More...
 
#define PHAL_MFDF_CMD_SET_CONFIG   0x5C
 MF DF Set Configuration Cmd. More...
 
#define PHAL_MFDF_CMD_GET_CARD_UID   0x51
 MF DF Get Card UID cmd. More...
 
#define PHAL_MFDF_CMD_GET_FILE_IDS   0x6F
 MF DF Get File IDs cmd. More...
 
#define PHAL_MFDF_CMD_GET_ISO_FILE_IDS   0x61
 MF DF Get ISO File IDs cmd. More...
 
#define PHAL_MFDF_CMD_GET_FILE_SETTINGS   0xF5
 MF DF Get File settings cmd. More...
 
#define PHAL_MFDF_CMD_CHANGE_FILE_SETTINGS   0x5F
 MF DF Change file settings cmd. More...
 
#define PHAL_MFDF_CMD_CREATE_STD_DATAFILE   0xCD
 MF DF Create Standard data file cmd. More...
 
#define PHAL_MFDF_CMD_CREATE_BKUP_DATAFILE   0xCB
 MF DF Create Backup data file cmd. More...
 
#define PHAL_MFDF_CMD_CREATE_VALUE_FILE   0xCC
 MF DF Create Value File cmd. More...
 
#define PHAL_MFDF_CMD_CREATE_LINEAR_RECFILE   0xC1
 MF DF Create Linear record file cmd. More...
 
#define PHAL_MFDF_CMD_CREATE_CYCLIC_RECFILE   0xC0
 MF DF Create Cyclic record file cmd. More...
 
#define PHAL_MFDF_CMD_DELETE_FILE   0xDF
 MF DF Delete File cmd. More...
 
#define PHAL_MFDF_CMD_READ_DATA   0xBD
 MF DF Read Data cmd. More...
 
#define PHAL_MFDF_CMD_WRITE_DATA   0x3D
 MF DF Write data cmd. More...
 
#define PHAL_MFDF_CMD_GET_VALUE   0x6C
 MF DF Get Value cmd. More...
 
#define PHAL_MFDF_CMD_CREDIT   0x0C
 MF DF Credit cmd. More...
 
#define PHAL_MFDF_CMD_DEBIT   0xDC
 MF DF Debit cmd. More...
 
#define PHAL_MFDF_CMD_LIMITED_CREDIT   0x1C
 MF DF Limited Credit cmd. More...
 
#define PHAL_MFDF_CMD_WRITE_RECORD   0x3B
 MF DF Write Record cmd. More...
 
#define PHAL_MFDF_CMD_READ_RECORDS   0xBB
 MF DF Read Records cmd. More...
 
#define PHAL_MFDF_CMD_CLEAR_RECORDS_FILE   0xEB
 MF DF Clear records file cmd. More...
 
#define PHAL_MFDF_CMD_COMMIT_TXN   0xC7
 MF DF Commit transaction cmd. More...
 
#define PHAL_MFDF_CMD_ABORT_TXN   0xA7
 MF DF Abort transaction cmd. More...
 

MIFARE Desfire Response Codes

#define PHAL_MFDF_RESP_OPERATION_OK   0x00U
 MF DF Response - Successful operation. More...
 
#define PHAL_MFDF_RESP_NO_CHANGES   0x0CU
 MF DF Response - No changes done to backup files. More...
 
#define PHAL_MFDF_RESP_ERR_OUT_OF_EEPROM_ERROR   0x0EU
 MF DF Response - Insufficient NV-Memory. More...
 
#define PHAL_MFDF_RESP_ILLEGAL_COMMAND_CODE   0x1CU
 MF DF command code not supported. More...
 
#define PHAL_MFDF_RESP_ERR_INTEGRITY_ERROR   0x1EU
 MF DF CRC or MAC does not match data padding bytes not valid. More...
 
#define PHAL_MFDF_RESP_NO_SUCH_KEY   0x40U
 MF DF Invalid key number specified. More...
 
#define PHAL_MFDF_RESP_ERR_LENGTH_ERROR   0x7EU
 MF DF Length of command string invalid. More...
 
#define PHAL_MFDF_RESP_PERMISSION_DENIED   0x9DU
 MF DF Current configuration/status does not allow the requested command. More...
 
#define PHAL_MFDF_RESP_ERR_PARAMETER_ERROR   0x9EU
 MF DF Value of params invalid. More...
 
#define PHAL_MFDF_RESP_APPLICATION_NOT_FOUND   0xA0U
 MF DF Requested AID not found on PICC. More...
 
#define PHAL_MFDF_RESP_ERR_APPL_INTEGRITY_ERROR   0xA1U
 MF DF Unrecoverable error within application, appln will be disabled. More...
 
#define PHAL_MFDF_RESP_ERR_AUTHENTICATION_ERROR   0xAEU
 MF DF Current authentication status does not allow the requested cmd. More...
 
#define PHAL_MFDF_RESP_ADDITIONAL_FRAME   0xAFU
 MF DF Additional data frame is expected to be sent. More...
 
#define PHAL_MFDF_RESP_ERR_BOUNDARY_ERROR   0xBEU
 MF DF Attempt to read/write data from/to beyond the files/record's limits. More...
 
#define PHAL_MFDF_RESP_ERR_PICC_INTEGRITY   0xC1U
 MF DF Unrecoverable error within PICC. More...
 
#define PHAL_MFDF_RESP_ERR_COMMAND_ABORTED   0xCAU
 MF DF Previous cmd not fully completed. More...
 
#define PHAL_MFDF_RESP_ERR_PIC_DISABLED   0xCDU
 MF DF PICC was disabled by an unrecoverable error. More...
 
#define PHAL_MFDF_RESP_ERR_COUNT   0xCEU
 MF DF Num. More...
 
#define PHAL_MFDF_RESP_ERR_DUPLICATE   0xDEU
 MF DF File/Application with same number already exists. More...
 
#define PHAL_MFDF_RESP_ERR_EEPROM   0xEEU
 MF DF Could not complete NV-Write operation due to loss of power. More...
 
#define PHAL_MFDF_RESP_ERR_FILE_NOT_FOUND   0xF0U
 MF DF Specified file number does not exist. More...
 
#define PHAL_MFDF_RESP_ERR_FILE_INTEGRITY   0xF1U
 MF DF Unrecoverable error within file. More...
 

ISO 7816 Instructions

#define PHAL_MFDF_CMD_ISO7816_SELECT_FILE   0xA4
 ISO Select File. More...
 
#define PHAL_MFDF_CMD_ISO7816_READ_RECORDS   0xB2
 ISO Read records. More...
 
#define PHAL_MFDF_CMD_ISO7816_READ_BINARY   0xB0
 ISO Read Binary. More...
 
#define PHAL_MFDF_CMD_ISO7816_UPDATE_BINARY   0xD6
 ISO UPDATE Binary. More...
 
#define PHAL_MFDF_CMD_ISO7816_APPEND_RECORD   0xE2
 ISO Append record. More...
 
#define PHAL_MFDF_CMD_ISO7816_UPDATE_RECORD   0xD2
 ISO Update record. More...
 
#define PHAL_MFDF_CMD_ISO7816_GET_CHALLENGE   0x84
 ISO Get challenge. More...
 
#define PHAL_MFDF_CMD_ISO7816_EXT_AUTHENTICATE   0x82
 ISO Ext. More...
 
#define PHAL_MFDF_CMD_ISO7816_INT_AUTHENTICATE   0x88
 ISO Int. More...
 

MIFARE Desfire specific defines

#define PHAL_MFDF_MAXWRAPPEDAPDU_SIZE   0x37u
 Maximum size of wrapped APDU 55 bytes. More...
 
#define PHAL_MFDF_MAXDFAPDU_SIZE   0x3Cu
 Maximum size of DESFire APDU 60 bytes. More...
 
#define PHAL_MFDF_DFAPPID_SIZE   0x03u
 Size of MF DF application Id. More...
 
#define PHAL_MFDF_DATA_BLOCK_SIZE   0x10u
 Data block size need for internal purposes. More...
 
#define PHAL_MFDF_MAX_FRAME_SIZE   0x40u
 Max size in a ISO 14443-4 frame. More...
 

ISO 7816 DF return Codes

#define PHAL_MFDF_ISO7816_SUCCESS   0x9000U
 Correct execution. More...
 
#define PHAL_MFDF_ISO7816_ERR_WRONG_LENGTH   0x6700U
 Wrong length. More...
 
#define PHAL_MFDF_ISO7816_ERR_WRONG_PARAMS   0x6A86U
 Wrong parameters P1 and/or P2. More...
 
#define PHAL_MFDF_ISO7816_ERR_WRONG_LC   0x6A87U
 Lc inconsistent with P1/p2. More...
 
#define PHAL_MFDF_ISO7816_ERR_WRONG_LE   0x6C00U
 Wrong Le. More...
 
#define PHAL_MFDF_ISO7816_ERR_NO_PRECISE_DIAGNOSTICS   0x6F00U
 No precise diagnostics. More...
 
#define PHAL_MFDF_ISO7816_ERR_EOF_REACHED   0x6282U
 End of File reached. More...
 
#define PHAL_MFDF_ISO7816_ERR_FILE_ACCESS   0x6982U
 File access not allowed. More...
 
#define PHAL_MFDF_ISO7816_ERR_FILE_EMPTY   0x6985U
 File empty or access conditions not satisfied. More...
 
#define PHAL_MFDF_ISO7816_ERR_FILE_NOT_FOUND   0x6A82U
 Application / File not found. More...
 
#define PHAL_MFDF_ISO7816_ERR_MEMORY_FAILURE   0x6581U
 Memory failure (unsuccessful update). More...
 
#define PHAL_MFDF_ISO7816_ERR_INCORRECT_PARAMS   0x6B00U
 Wrong parameter p1 or p2. More...
 
#define PHAL_MFDF_ISO7816_ERR_WRONG_CLA   0x6E00U
 Wrong Class byte. More...
 
#define PHAL_MFDF_ISO7816_ERR_UNSUPPORTED_INS   0x6D00U
 Instruction not supported. More...
 

MIFARE Plus Commands in MIFARE Plus Mode

#define PHAL_MFP_CMD_AUTH1_FIRST   0x70
 MFP Authenticate command (part 1, first authentication). More...
 
#define PHAL_MFP_CMD_AUTH1   0x76
 MFP Authenticate command (part 1, non-first authentication). More...
 
#define PHAL_MFP_CMD_AUTH2   0x72
 MFP Authenticate command (part 2). More...
 
#define PHAL_MFP_CMD_AUTH3   0x74
 MFP Authenticate command (part 3). More...
 
#define PHAL_MFP_CMD_RAUTH   0x78
 MFP ResetAuth command. More...
 
#define PHAL_MFP_CMD_READ_ENM   0x30
 MFP Read Encrypted, No mac on response, Mac on command. More...
 
#define PHAL_MFP_CMD_READ_EMM   0x31
 MFP Read Encrypted, Mac on response, Mac on command. More...
 
#define PHAL_MFP_CMD_READ_PNM   0x32
 MFP Read Plain, No mac on response, Mac on command. More...
 
#define PHAL_MFP_CMD_READ_PMM   0x33
 MFP Read Plain, Mac on response, Mac on command. More...
 
#define PHAL_MFP_CMD_READ_ENU   0x34
 MFP Read Encrypted, No mac on response, Unmac'ed command. More...
 
#define PHAL_MFP_CMD_READ_EMU   0x35
 MFP Read Encrypted, Mac on response, Unmac'ed command. More...
 
#define PHAL_MFP_CMD_READ_PNU   0x36
 MFP Read Plain, No mac on response, Unmac'ed command. More...
 
#define PHAL_MFP_CMD_READ_PMU   0x37
 MFP Read Plain, Mac on response, Unmac'ed command. More...
 
#define PHAL_MFP_CMD_WRITE_EN   0xA0
 MFP Write Encrypted, No mac on response, (Mac on command). More...
 
#define PHAL_MFP_CMD_WRITE_EM   0xA1
 MFP Write Encrypted, Mac on response, (Mac on command). More...
 
#define PHAL_MFP_CMD_WRITE_PN   0xA2
 MFP Write Plain, No mac on response, (Mac on command). More...
 
#define PHAL_MFP_CMD_WRITE_PM   0xA3
 MFP Write Plain, Mac on response, (Mac on command). More...
 
#define PHAL_MFP_CMD_WRITEPERSO   0xA8
 MFP Write Perso. More...
 
#define PHAL_MFP_CMD_COMMITPERSO   0xAA
 MFP Commit Perso. More...
 
#define PHAL_MFP_CMD_INCR   0xB0
 MFP Increment command. More...
 
#define PHAL_MFP_CMD_INCR_M   0xB1
 MFP Increment command MACed. More...
 
#define PHAL_MFP_CMD_DECR   0xB2
 MFP Decrement command. More...
 
#define PHAL_MFP_CMD_DECR_M   0xB3
 MFP Decrement command MACed. More...
 
#define PHAL_MFP_CMD_TRANS   0xB4
 MFP Transfer command. More...
 
#define PHAL_MFP_CMD_TRANS_M   0xB5
 MFP Transfer command MACed. More...
 
#define PHAL_MFP_CMD_INCRTR   0xB6
 MFP Increment Transfer command. More...
 
#define PHAL_MFP_CMD_INCRTR_M   0xB7
 MFP Increment Transfer command MACed. More...
 
#define PHAL_MFP_CMD_DECRTR   0xB8
 MFP Decrement Transfer command. More...
 
#define PHAL_MFP_CMD_DECRTR_M   0xB9
 MFP Decrement Transfer command MACed. More...
 
#define PHAL_MFP_CMD_REST   0xC2
 MFP Restore command. More...
 
#define PHAL_MFP_CMD_REST_M   0xC3
 MFP Restore command MACed. More...
 
#define PHAL_MFP_CMD_PPC   0xF0
 MFP Prepare Proximity Check. More...
 
#define PHAL_MFP_CMD_PC   0xF2
 MFP Proximity Check command. More...
 
#define PHAL_MFP_CMD_VPC   0xFD
 MFP Verify Proximity Check command. More...
 

MIFARE Plus Commands in MIFARE Mode

#define PHAL_MFP_CMD_MBREAD   0x38
 MFP Multi Block Read. More...
 
#define PHAL_MFP_CMD_MBWRITE   0xA8
 MFP Multi Block Read. More...
 

MIFARE Plus Response Codes

#define PHAL_MFP_RESP_NACK0   0x00U /*< MFP NACK 0 (in ISO14443-3 mode). */
 
#define PHAL_MFP_RESP_NACK1   0x01U /*< MFP NACK 1 (in ISO14443-3 mode). */
 
#define PHAL_MFP_RESP_NACK4   0x04U /*< MFP NACK 4 (in ISO14443-3 mode). */
 
#define PHAL_MFP_RESP_NACK5   0x05U /*< MFP NACK 5 (in ISO14443-3 mode). */
 
#define PHAL_MFP_RESP_ACK_ISO3   0x0AU /*< MFP ACK (in ISO14443-3 mode). */
 
#define PHAL_MFP_RESP_ACK_ISO4   0x90U /*< MFP ACK (in ISO14443-4 mode). */
 
#define PHAL_MFP_RESP_ERR_AUTH   0x06U /*< MFP Authentication Error. */
 
#define PHAL_MFP_RESP_ERR_CMD_OVERFLOW   0x07U /*< MFP Command Overflow Error. */
 
#define PHAL_MFP_RESP_ERR_MAC_PCD   0x08U /*< MFP MAC Error. */
 
#define PHAL_MFP_RESP_ERR_BNR   0x09U /*< MFP Blocknumber Error. */
 
#define PHAL_MFP_RESP_ERR_EXT   0x0AU /*< MFP Extension Error. */
 
#define PHAL_MFP_RESP_ERR_CMD_INVALID   0x0BU /*< MFP Invalid Command Error. */
 
#define PHAL_MFP_RESP_ERR_FORMAT   0x0CU /*< MFP Format Error. */
 
#define PHAL_MFP_RESP_ERR_GEN_FAILURE   0x0FU /*< MFP Generic Error. */
 

SLI Command Codes

#define PHAL_SLI_CMD_SET_EAS   0xA2
 SLI-S/SLI-L This command enables the EAS mode if the EAS mode is not locked. More...
 
#define PHAL_SLI_CMD_RESET_EAS   0xA3
 SLI-S/SLI-L This command disables the EAS mode if the EAS mode is not locked. More...
 
#define PHAL_SLI_CMD_LOCK_EAS   0xA4
 SLI-S/SLI-L This command locks the current state of the EAS mode and the EAS ID. More...
 
#define PHAL_SLI_CMD_EAS_ALARM   0xA5
 SLI-S/SLI-L EAS Alarm command. More...
 
#define PHAL_SLI_CMD_PASSWORD_PROTECT_EAS   0xA6
 SLI-S/SLI-L This command enables the password protection for EAS. More...
 
#define PHAL_SLI_CMD_WRITE_EAS_ID   0xA7
 SLI-S/SLI-L Write a new AES Identifier in the corresponding configuration memory. More...
 
#define PHAL_SLI_CMD_READ_EPC   0xA8
 SLI-S Return the EPC data. More...
 
#define PHAL_SLI_CMD_GET_NXP_SYSTEM_INFOMATION   0xAB
 SLIX2 Return the information about the IC access conditions and supported features. More...
 
#define PHAL_SLI_CMD_GET_RANDOM_NUMBER   0xB2
 SLI-S/SLI-L Receive a random number from the label IC. More...
 
#define PHAL_SLI_CMD_SET_PASSWORD   0xB3
 SLI-S/SLI-L Set password to get access to different protected functionalities. More...
 
#define PHAL_SLI_CMD_WRITE_PASSWORD   0xB4
 SLI-S/SLI-L Write a new password into the related memory. More...
 
#define PHAL_SLI_CMD_LOCK_PASSWORD   0xB5
 SLI-S/SLI-L This command will lock the addressed password to prevent futur change. More...
 
#define PHAL_SLI_CMD_PROTECT_PAGE   0xB6
 SLI-S Define the restriction to get access to the related page. More...
 
#define PHAL_SLI_CMD_LOCK_PAGE_PROTECT_COND   0xB7
 SLI-S Lock the page protection condition. More...
 
#define PHAL_SLI_CMD_GET_MULT_BLOCK_PROT_ST   0xB8
 SLI-S Return the block protection status of the requested blocks. More...
 
#define PHAL_SLI_CMD_DESTROY_SLI   0xB9
 SLI-S/SLI-L This irreversible command destroys the label IC. More...
 
#define PHAL_SLI_CMD_ENABLE_PRIVACY   0xBA
 SLI-S/SLI-L Enter into the privacy mode. More...
 
#define PHAL_SLI_CMD_64BIT_PASSWORD_PROTECT   0xBB
 SLI-S Lead to require both Rd and Wr passwords to get access to password protected blocks. More...
 
#define PHAL_SLI_CMD_READ_SIGNATURE   0xBD
 SLI-S/SLI-L returns an IC specific, 32-byte ECC signature. More...
 

Felica Command Codes

#define PHPAL_FELICA_SW_CMD_REQC   0x00U
 RequestC. More...
 
#define PHPAL_FELICA_SW_CMD_REQ_RESP   0x04U
 Request Response. More...
 
#define PHPAL_FELICA_SW_CMD_REQ_SERVICE   0x02U
 Request Service. More...
 
#define PHPAL_FELICA_SW_CMD_READ   0x06U
 Read. More...
 
#define PHPAL_FELICA_SW_CMD_WRITE   0x08U
 Write. More...
 
#define PHPAL_FELICA_SW_CMD_AUTH1   0x10U
 Authentication1. More...
 
#define PHPAL_FELICA_SW_CMD_AUTH2   0x12U
 Authentication2. More...
 
#define PHPAL_FELICA_SW_CMD_READ_SECF   0x14U
 Read from secure file. More...
 
#define PHPAL_FELICA_SW_CMD_WRITE_SECF   0x16U
 Write to secure file. More...
 
#define PHPAL_FELICA_SW_RSP_REQC   0x01U
 Response to RequestC. More...
 
#define PHPAL_FELICA_SW_LEN_BYTE_SIZE   0x01U
 Size of Length byte in RequestC response. More...
 
#define PHPAL_FELICA_SW_RESP_REQC_SIZE   0x01U
 Length of Response byte in RequestC response. More...
 

Flags

#define PHPAL_FELICA_SW_FLAG_ERROR   0x01U
 Error Flag. More...
 
#define PHPAL_FELICA_SW_FLAG_ADDRESSED   0x20U
 Addressed Flag. More...
 
#define PHPAL_FELICA_SW_FLAG_SELECTED   0x10U
 Selected Flag. More...
 

Values

#define PHPAL_FELICA_SW_IDMPMM_VALID   0x01U
 Stored UID is valid. More...
 
#define PHPAL_FELICA_SW_IDMPMM_INVALID   0x00U
 Stored UID is not valid. More...
 
#define PHPAL_FELICA_SW_RESP_FRAME_SIZE   32U
 Size of one Felica Response Frame. More...
 

Timing constants

#define PHPAL_FELICA_SW_TIME_T_US   302U
 
#define PHPAL_FELICA_SW_EXT_TIME_US   500U
 Time extension in microseconds for all commands. More...
 
#define PHPAL_FELICA_SW_T_DELAY_US   2417
 NFC Forum Digital Protocol Technical Specification v1.1 : Appendix A.4.
 
#define PHPAL_FELICA_SW_T_TIMESLOT_US   1208
 NFC Forum Digital Protocol Technical Specification v1.1 : Appendix A.4.
 
#define PHPAL_FELICA_SW_T_DELTA_F_POLL_US   1
 NFC Forum Digital Protocol Technical Specification v1.1 : Appendix A.4.
 
#define PHPAL_FELICA_SW_TR1_48BITS_AT212_US   227
 NFC Forum Digital Protocol Technical Specification v1.1 : 8.1.2.
 
#define PHPAL_FELICA_SW_TR1_56BITS_AT212_US   255
 
#define PHPAL_FELICA_SW_TR1_64BITS_AT212_US   302
 
#define PHPAL_FELICA_SW_TR1_72BITS_AT212_US   340
 
#define PHPAL_FELICA_SW_TR1_48BITS_AT424_US   114
 NFC Forum Digital Protocol Technical Specification v1.1 : 8.1.2.
 
#define PHPAL_FELICA_SW_TR1_56BITS_AT424_US   128
 
#define PHPAL_FELICA_SW_TR1_64BITS_AT424_US   151
 
#define PHPAL_FELICA_SW_TR1_72BITS_AT424_US   170
 

Command Codes

#define PHPAL_I18000P3M3_CMD_SELECT   0x0A
 Select command code. More...
 
#define PHPAL_I18000P3M3_CMD_BEGIN_ROUND   0x08
 BeginRound command code. More...
 
#define PHPAL_I18000P3M3_CMD_RESIZE_ROUND   0x09
 ResizeRound command code. More...
 
#define PHPAL_I18000P3M3_CMD_NEXT_SLOT   0x00
 NextSlot command code. More...
 
#define PHPAL_I18000P3M3_CMD_ACK   0x01
 ACK command code. More...
 
#define PHPAL_I18000P3M3_CMD_NAK   0xC0
 NAK command code. More...
 

Timeout constants

#define PHPAL_I18000P3M3_SW_T1_MAX_US   78U
 
#define PHPAL_I18000P3M3_SW_T2_MIN_US   151U
 
#define PHPAL_I18000P3M3_SW_T3_MIN_US   25U
 
#define PHPAL_I18000P3M3_SW_T4_MIN_US   100U
 
#define PHPAL_I18000P3M3_SW_DELTA_MIN_US   10U
 

Constats

#define PHPAL_SLI15693_SW_NXP_MFG_CODE   0x04U
 IC Manufacturer Code of NXP. More...
 
#define PHPAL_SLI15693_SW_EXT_TIME_US   60
 Time extension in microseconds for all commands. More...
 
#define PHPAL_SLI15693_SW_T1_WAITING_TIME   324U
 Waiting time T1 in us (ISO/IEC15693, 9.1.4.)
 
#define PHPAL_SLI15693_SW_T2_WAITING_TIME   310U
 Waiting time T2 in us (ISO/IEC15693, 9.1.4.)
 
#define PHPAL_SLI15693_SW_UID_COMPLETE   64U
 UID length in bits when complete. More...
 
#define PHPAL_SLI15693_SW_FLAGS_DEFAULT   0x06U
 Default flags (DATA_RATE and INVENTORY BIT is set). More...
 
#define PHPAL_SLI15693_SW_TIMEOUT_SLOT_US   PHPAL_SLI15693_SW_T1_WAITING_TIME + PHPAL_SLI15693_SW_T2_WAITING_TIME
 Slot timeout.
 

Mandatory commands

#define PHPAL_SLI15693_SW_CMD_INVENTORY   0x01U
 Anticollision inventory cmd code.
 
#define PHPAL_SLI15693_SW_CMD_STAY_QUIET   0x02U
 Stay Quiet cmd code.
 

Optional commands

#define PHPAL_SLI15693_SW_CMD_SELECT   0x25U
 Select cmd code.
 
#define PHPAL_SLI15693_SW_CMD_RESET_TO_READY   0x26U
 Reset to ready cmd code.
 

Custom commands

#define PHPAL_SLI15693_SW_CMD_INVENTORY_READ   0xA0U
 Inventory read cmd code.
 
#define PHPAL_SLI15693_SW_CMD_FAST_INVENTORY_READ   0xA1U
 Fast inventory read cmd code.
 
#define PHPAL_SLI15693_SW_CMD_INVENTORY_PAGE_READ   0xB0U
 Inventory page read cmd code.
 
#define PHPAL_SLI15693_SW_CMD_FAST_INVENTORY_PAGE_READ   0xB1U
 Fast inventory page read cmd code.
 
#define PHPAL_SLI15693_SW_CMD_STAY_QUIET_PERSISTENT   0xBCU
 Stay quiet persistent cmd code.
 

Detailed Description

Private definitions and functions of all components.

Macro Definition Documentation

§ PHAL_FELICA_CMD_REQUEST_RESPONSE

#define PHAL_FELICA_CMD_REQUEST_RESPONSE   0x04U

Get the PICCs current mode.

§ PHAL_FELICA_CMD_REQUEST_SERVICE

#define PHAL_FELICA_CMD_REQUEST_SERVICE   0x02U

Get area key version and service key version.

§ PHAL_FELICA_CMD_READ

#define PHAL_FELICA_CMD_READ   0x06U

Read the record value of the specified service.

§ PHAL_FELICA_CMD_WRITE

#define PHAL_FELICA_CMD_WRITE   0x08U

Write records of the specified service.

§ PHAL_FELICA_RSP_REQUEST_RESPONSE

#define PHAL_FELICA_RSP_REQUEST_RESPONSE   0x05U

Response code to the Request Response command.

§ PHAL_FELICA_RSP_REQUEST_SERVICE

#define PHAL_FELICA_RSP_REQUEST_SERVICE   0x03U

Response code to the Request Service command.

§ PHAL_FELICA_RSP_READ

#define PHAL_FELICA_RSP_READ   0x07U

Response code to the Read command.

§ PHAL_FELICA_RSP_WRITE

#define PHAL_FELICA_RSP_WRITE   0x09U

Response code to the Write command.

§ PHAL_I18000P3M3_CMD_REQ_RN

#define PHAL_I18000P3M3_CMD_REQ_RN   0xC1

ReqRn command code.

§ PHAL_I18000P3M3_CMD_READ

#define PHAL_I18000P3M3_CMD_READ   0xC2

Read command code.

§ PHAL_I18000P3M3_CMD_WRITE

#define PHAL_I18000P3M3_CMD_WRITE   0xC3

Write command code.

§ PHAL_I18000P3M3_CMD_KILL

#define PHAL_I18000P3M3_CMD_KILL   0xC4

Kill command code.

§ PHAL_I18000P3M3_CMD_LOCK

#define PHAL_I18000P3M3_CMD_LOCK   0xC5

Lock command code.

§ PHAL_I18000P3M3_CMD_ACCESS

#define PHAL_I18000P3M3_CMD_ACCESS   0xC6

Access command code.

§ PHAL_I18000P3M3_CMD_BLOCKWRITE

#define PHAL_I18000P3M3_CMD_BLOCKWRITE   0xC7

BlockWrite command code.

§ PHAL_I18000P3M3_CMD_BLOCKERASE

#define PHAL_I18000P3M3_CMD_BLOCKERASE   0xC8

BlockErase command code.

§ PHAL_I18000P3M3_CMD_BLOCKPERMALOCK

#define PHAL_I18000P3M3_CMD_BLOCKPERMALOCK   0xC9

BlockPermaLock command code.

§ PHAL_I18000P3M3_ERRCODE_OTHER

#define PHAL_I18000P3M3_ERRCODE_OTHER   0x00U

Other Error.

§ PHAL_I18000P3M3_ERRCODE_MEMORY_OVERRUN

#define PHAL_I18000P3M3_ERRCODE_MEMORY_OVERRUN   0x03U

Memory overrun.

§ PHAL_I18000P3M3_ERRCODE_MEMORY_LOCKED

#define PHAL_I18000P3M3_ERRCODE_MEMORY_LOCKED   0x04U

Memory locked.

§ PHAL_I18000P3M3_ERRCODE_INSUFFICIENT_POWER

#define PHAL_I18000P3M3_ERRCODE_INSUFFICIENT_POWER   0x0BU

Insufficient power.

§ PHAL_I18000P3M3_ERRCODE_NON_SPECIFIC

#define PHAL_I18000P3M3_ERRCODE_NON_SPECIFIC   0x0FU

Non-specific error.

§ PHAL_MFDF_CMD_AUTHENTICATE

#define PHAL_MFDF_CMD_AUTHENTICATE   0x0A

MF DF Authenticate command.

§ PHAL_MFDF_CMD_AUTHENTICATE_ISO

#define PHAL_MFDF_CMD_AUTHENTICATE_ISO   0x1A

MF DF Authenticate ISO command.

§ PHAL_MFDF_CMD_AUTHENTICATE_AES

#define PHAL_MFDF_CMD_AUTHENTICATE_AES   0xAA

MF DF Authenticate AES command.

§ PHAL_MFDF_CMD_CHANGE_KEY_SETTINGS

#define PHAL_MFDF_CMD_CHANGE_KEY_SETTINGS   0x54

MF DF Change key settings cmd.

§ PHAL_MFDF_CMD_GET_KEY_SETTINGS

#define PHAL_MFDF_CMD_GET_KEY_SETTINGS   0x45

MF DF Get Key Settings Cmd.

§ PHAL_MFDF_CMD_CHANGE_KEY

#define PHAL_MFDF_CMD_CHANGE_KEY   0xC4

MF DF Change key cmd.

§ PHAL_MFDF_CMD_GET_KEY_VERSION

#define PHAL_MFDF_CMD_GET_KEY_VERSION   0x64

MF DF Get Key Version.

§ PHAL_MFDF_CMD_CREATE_APPLN

#define PHAL_MFDF_CMD_CREATE_APPLN   0xCA

MF DF Create Application cmd.

§ PHAL_MFDF_CMD_DELETE_APPLN

#define PHAL_MFDF_CMD_DELETE_APPLN   0xDA

MF DF Delete Application cmd.

§ PHAL_MFDF_CMD_GET_APPLN_IDS

#define PHAL_MFDF_CMD_GET_APPLN_IDS   0x6A

MF DF Get Application Ids cmd.

§ PHAL_MFDF_CMD_GET_DF_NAMES

#define PHAL_MFDF_CMD_GET_DF_NAMES   0x6D

MF DF Get Dedicated Fine names cmd.

§ PHAL_MFDF_CMD_SELECT_APPLN

#define PHAL_MFDF_CMD_SELECT_APPLN   0x5A

MF DF Select Application Cmd.

§ PHAL_MFDF_CMD_FORMAT_PICC

#define PHAL_MFDF_CMD_FORMAT_PICC   0xFC

MF DF Format PICC Cmd.

§ PHAL_MFDF_CMD_GET_VERSION

#define PHAL_MFDF_CMD_GET_VERSION   0x60

MF DF Get Version cmd.

§ PHAL_MFDF_CMD_FREE_MEM

#define PHAL_MFDF_CMD_FREE_MEM   0x6E

MF DF Free Memory cmd.

§ PHAL_MFDF_CMD_SET_CONFIG

#define PHAL_MFDF_CMD_SET_CONFIG   0x5C

MF DF Set Configuration Cmd.

§ PHAL_MFDF_CMD_GET_CARD_UID

#define PHAL_MFDF_CMD_GET_CARD_UID   0x51

MF DF Get Card UID cmd.

§ PHAL_MFDF_CMD_GET_FILE_IDS

#define PHAL_MFDF_CMD_GET_FILE_IDS   0x6F

MF DF Get File IDs cmd.

§ PHAL_MFDF_CMD_GET_ISO_FILE_IDS

#define PHAL_MFDF_CMD_GET_ISO_FILE_IDS   0x61

MF DF Get ISO File IDs cmd.

§ PHAL_MFDF_CMD_GET_FILE_SETTINGS

#define PHAL_MFDF_CMD_GET_FILE_SETTINGS   0xF5

MF DF Get File settings cmd.

§ PHAL_MFDF_CMD_CHANGE_FILE_SETTINGS

#define PHAL_MFDF_CMD_CHANGE_FILE_SETTINGS   0x5F

MF DF Change file settings cmd.

§ PHAL_MFDF_CMD_CREATE_STD_DATAFILE

#define PHAL_MFDF_CMD_CREATE_STD_DATAFILE   0xCD

MF DF Create Standard data file cmd.

§ PHAL_MFDF_CMD_CREATE_BKUP_DATAFILE

#define PHAL_MFDF_CMD_CREATE_BKUP_DATAFILE   0xCB

MF DF Create Backup data file cmd.

§ PHAL_MFDF_CMD_CREATE_VALUE_FILE

#define PHAL_MFDF_CMD_CREATE_VALUE_FILE   0xCC

MF DF Create Value File cmd.

§ PHAL_MFDF_CMD_CREATE_LINEAR_RECFILE

#define PHAL_MFDF_CMD_CREATE_LINEAR_RECFILE   0xC1

MF DF Create Linear record file cmd.

§ PHAL_MFDF_CMD_CREATE_CYCLIC_RECFILE

#define PHAL_MFDF_CMD_CREATE_CYCLIC_RECFILE   0xC0

MF DF Create Cyclic record file cmd.

§ PHAL_MFDF_CMD_DELETE_FILE

#define PHAL_MFDF_CMD_DELETE_FILE   0xDF

MF DF Delete File cmd.

§ PHAL_MFDF_CMD_READ_DATA

#define PHAL_MFDF_CMD_READ_DATA   0xBD

MF DF Read Data cmd.

§ PHAL_MFDF_CMD_WRITE_DATA

#define PHAL_MFDF_CMD_WRITE_DATA   0x3D

MF DF Write data cmd.

§ PHAL_MFDF_CMD_GET_VALUE

#define PHAL_MFDF_CMD_GET_VALUE   0x6C

MF DF Get Value cmd.

§ PHAL_MFDF_CMD_CREDIT

#define PHAL_MFDF_CMD_CREDIT   0x0C

MF DF Credit cmd.

§ PHAL_MFDF_CMD_DEBIT

#define PHAL_MFDF_CMD_DEBIT   0xDC

MF DF Debit cmd.

§ PHAL_MFDF_CMD_LIMITED_CREDIT

#define PHAL_MFDF_CMD_LIMITED_CREDIT   0x1C

MF DF Limited Credit cmd.

§ PHAL_MFDF_CMD_WRITE_RECORD

#define PHAL_MFDF_CMD_WRITE_RECORD   0x3B

MF DF Write Record cmd.

§ PHAL_MFDF_CMD_READ_RECORDS

#define PHAL_MFDF_CMD_READ_RECORDS   0xBB

MF DF Read Records cmd.

§ PHAL_MFDF_CMD_CLEAR_RECORDS_FILE

#define PHAL_MFDF_CMD_CLEAR_RECORDS_FILE   0xEB

MF DF Clear records file cmd.

§ PHAL_MFDF_CMD_COMMIT_TXN

#define PHAL_MFDF_CMD_COMMIT_TXN   0xC7

MF DF Commit transaction cmd.

§ PHAL_MFDF_CMD_ABORT_TXN

#define PHAL_MFDF_CMD_ABORT_TXN   0xA7

MF DF Abort transaction cmd.

§ PHAL_MFDF_RESP_OPERATION_OK

#define PHAL_MFDF_RESP_OPERATION_OK   0x00U

MF DF Response - Successful operation.

§ PHAL_MFDF_RESP_NO_CHANGES

#define PHAL_MFDF_RESP_NO_CHANGES   0x0CU

MF DF Response - No changes done to backup files.

§ PHAL_MFDF_RESP_ERR_OUT_OF_EEPROM_ERROR

#define PHAL_MFDF_RESP_ERR_OUT_OF_EEPROM_ERROR   0x0EU

MF DF Response - Insufficient NV-Memory.

§ PHAL_MFDF_RESP_ILLEGAL_COMMAND_CODE

#define PHAL_MFDF_RESP_ILLEGAL_COMMAND_CODE   0x1CU

MF DF command code not supported.

§ PHAL_MFDF_RESP_ERR_INTEGRITY_ERROR

#define PHAL_MFDF_RESP_ERR_INTEGRITY_ERROR   0x1EU

MF DF CRC or MAC does not match data padding bytes not valid.

§ PHAL_MFDF_RESP_NO_SUCH_KEY

#define PHAL_MFDF_RESP_NO_SUCH_KEY   0x40U

MF DF Invalid key number specified.

§ PHAL_MFDF_RESP_ERR_LENGTH_ERROR

#define PHAL_MFDF_RESP_ERR_LENGTH_ERROR   0x7EU

MF DF Length of command string invalid.

§ PHAL_MFDF_RESP_PERMISSION_DENIED

#define PHAL_MFDF_RESP_PERMISSION_DENIED   0x9DU

MF DF Current configuration/status does not allow the requested command.

§ PHAL_MFDF_RESP_ERR_PARAMETER_ERROR

#define PHAL_MFDF_RESP_ERR_PARAMETER_ERROR   0x9EU

MF DF Value of params invalid.

§ PHAL_MFDF_RESP_APPLICATION_NOT_FOUND

#define PHAL_MFDF_RESP_APPLICATION_NOT_FOUND   0xA0U

MF DF Requested AID not found on PICC.

§ PHAL_MFDF_RESP_ERR_APPL_INTEGRITY_ERROR

#define PHAL_MFDF_RESP_ERR_APPL_INTEGRITY_ERROR   0xA1U

MF DF Unrecoverable error within application, appln will be disabled.

§ PHAL_MFDF_RESP_ERR_AUTHENTICATION_ERROR

#define PHAL_MFDF_RESP_ERR_AUTHENTICATION_ERROR   0xAEU

MF DF Current authentication status does not allow the requested cmd.

§ PHAL_MFDF_RESP_ADDITIONAL_FRAME

#define PHAL_MFDF_RESP_ADDITIONAL_FRAME   0xAFU

MF DF Additional data frame is expected to be sent.

§ PHAL_MFDF_RESP_ERR_BOUNDARY_ERROR

#define PHAL_MFDF_RESP_ERR_BOUNDARY_ERROR   0xBEU

MF DF Attempt to read/write data from/to beyond the files/record's limits.

§ PHAL_MFDF_RESP_ERR_PICC_INTEGRITY

#define PHAL_MFDF_RESP_ERR_PICC_INTEGRITY   0xC1U

MF DF Unrecoverable error within PICC.

PICC will be disabled.

§ PHAL_MFDF_RESP_ERR_COMMAND_ABORTED

#define PHAL_MFDF_RESP_ERR_COMMAND_ABORTED   0xCAU

MF DF Previous cmd not fully completed.

Not all frames were requested or provided by the PCD.

§ PHAL_MFDF_RESP_ERR_PIC_DISABLED

#define PHAL_MFDF_RESP_ERR_PIC_DISABLED   0xCDU

MF DF PICC was disabled by an unrecoverable error.

§ PHAL_MFDF_RESP_ERR_COUNT

#define PHAL_MFDF_RESP_ERR_COUNT   0xCEU

MF DF Num.

of applns limited to 28. No additional applications possible.

§ PHAL_MFDF_RESP_ERR_DUPLICATE

#define PHAL_MFDF_RESP_ERR_DUPLICATE   0xDEU

MF DF File/Application with same number already exists.

§ PHAL_MFDF_RESP_ERR_EEPROM

#define PHAL_MFDF_RESP_ERR_EEPROM   0xEEU

MF DF Could not complete NV-Write operation due to loss of power.

§ PHAL_MFDF_RESP_ERR_FILE_NOT_FOUND

#define PHAL_MFDF_RESP_ERR_FILE_NOT_FOUND   0xF0U

MF DF Specified file number does not exist.

§ PHAL_MFDF_RESP_ERR_FILE_INTEGRITY

#define PHAL_MFDF_RESP_ERR_FILE_INTEGRITY   0xF1U

MF DF Unrecoverable error within file.

File will be disabled.

§ PHAL_MFDF_CMD_ISO7816_SELECT_FILE

#define PHAL_MFDF_CMD_ISO7816_SELECT_FILE   0xA4

ISO Select File.

§ PHAL_MFDF_CMD_ISO7816_READ_RECORDS

#define PHAL_MFDF_CMD_ISO7816_READ_RECORDS   0xB2

ISO Read records.

§ PHAL_MFDF_CMD_ISO7816_READ_BINARY

#define PHAL_MFDF_CMD_ISO7816_READ_BINARY   0xB0

ISO Read Binary.

§ PHAL_MFDF_CMD_ISO7816_UPDATE_BINARY

#define PHAL_MFDF_CMD_ISO7816_UPDATE_BINARY   0xD6

ISO UPDATE Binary.

§ PHAL_MFDF_CMD_ISO7816_APPEND_RECORD

#define PHAL_MFDF_CMD_ISO7816_APPEND_RECORD   0xE2

ISO Append record.

§ PHAL_MFDF_CMD_ISO7816_UPDATE_RECORD

#define PHAL_MFDF_CMD_ISO7816_UPDATE_RECORD   0xD2

ISO Update record.

§ PHAL_MFDF_CMD_ISO7816_GET_CHALLENGE

#define PHAL_MFDF_CMD_ISO7816_GET_CHALLENGE   0x84

ISO Get challenge.

§ PHAL_MFDF_CMD_ISO7816_EXT_AUTHENTICATE

#define PHAL_MFDF_CMD_ISO7816_EXT_AUTHENTICATE   0x82

ISO Ext.

Authenticate.

§ PHAL_MFDF_CMD_ISO7816_INT_AUTHENTICATE

#define PHAL_MFDF_CMD_ISO7816_INT_AUTHENTICATE   0x88

ISO Int.

Authenticate.

§ PHAL_MFDF_MAXWRAPPEDAPDU_SIZE

#define PHAL_MFDF_MAXWRAPPEDAPDU_SIZE   0x37u

Maximum size of wrapped APDU 55 bytes.

§ PHAL_MFDF_MAXDFAPDU_SIZE

#define PHAL_MFDF_MAXDFAPDU_SIZE   0x3Cu

Maximum size of DESFire APDU 60 bytes.

§ PHAL_MFDF_DFAPPID_SIZE

#define PHAL_MFDF_DFAPPID_SIZE   0x03u

Size of MF DF application Id.

§ PHAL_MFDF_DATA_BLOCK_SIZE

#define PHAL_MFDF_DATA_BLOCK_SIZE   0x10u

Data block size need for internal purposes.

§ PHAL_MFDF_MAX_FRAME_SIZE

#define PHAL_MFDF_MAX_FRAME_SIZE   0x40u

Max size in a ISO 14443-4 frame.

§ PHAL_MFDF_ISO7816_SUCCESS

#define PHAL_MFDF_ISO7816_SUCCESS   0x9000U

Correct execution.

§ PHAL_MFDF_ISO7816_ERR_WRONG_LENGTH

#define PHAL_MFDF_ISO7816_ERR_WRONG_LENGTH   0x6700U

Wrong length.

§ PHAL_MFDF_ISO7816_ERR_WRONG_PARAMS

#define PHAL_MFDF_ISO7816_ERR_WRONG_PARAMS   0x6A86U

Wrong parameters P1 and/or P2.

§ PHAL_MFDF_ISO7816_ERR_WRONG_LC

#define PHAL_MFDF_ISO7816_ERR_WRONG_LC   0x6A87U

Lc inconsistent with P1/p2.

§ PHAL_MFDF_ISO7816_ERR_WRONG_LE

#define PHAL_MFDF_ISO7816_ERR_WRONG_LE   0x6C00U

Wrong Le.

§ PHAL_MFDF_ISO7816_ERR_NO_PRECISE_DIAGNOSTICS

#define PHAL_MFDF_ISO7816_ERR_NO_PRECISE_DIAGNOSTICS   0x6F00U

No precise diagnostics.

§ PHAL_MFDF_ISO7816_ERR_EOF_REACHED

#define PHAL_MFDF_ISO7816_ERR_EOF_REACHED   0x6282U

End of File reached.

§ PHAL_MFDF_ISO7816_ERR_FILE_ACCESS

#define PHAL_MFDF_ISO7816_ERR_FILE_ACCESS   0x6982U

File access not allowed.

§ PHAL_MFDF_ISO7816_ERR_FILE_EMPTY

#define PHAL_MFDF_ISO7816_ERR_FILE_EMPTY   0x6985U

File empty or access conditions not satisfied.

§ PHAL_MFDF_ISO7816_ERR_FILE_NOT_FOUND

#define PHAL_MFDF_ISO7816_ERR_FILE_NOT_FOUND   0x6A82U

Application / File not found.

§ PHAL_MFDF_ISO7816_ERR_MEMORY_FAILURE

#define PHAL_MFDF_ISO7816_ERR_MEMORY_FAILURE   0x6581U

Memory failure (unsuccessful update).

§ PHAL_MFDF_ISO7816_ERR_INCORRECT_PARAMS

#define PHAL_MFDF_ISO7816_ERR_INCORRECT_PARAMS   0x6B00U

Wrong parameter p1 or p2.

READ RECORDS.

§ PHAL_MFDF_ISO7816_ERR_WRONG_CLA

#define PHAL_MFDF_ISO7816_ERR_WRONG_CLA   0x6E00U

Wrong Class byte.

§ PHAL_MFDF_ISO7816_ERR_UNSUPPORTED_INS

#define PHAL_MFDF_ISO7816_ERR_UNSUPPORTED_INS   0x6D00U

Instruction not supported.

§ PHAL_MFP_CMD_AUTH1_FIRST

#define PHAL_MFP_CMD_AUTH1_FIRST   0x70

MFP Authenticate command (part 1, first authentication).

§ PHAL_MFP_CMD_AUTH1

#define PHAL_MFP_CMD_AUTH1   0x76

MFP Authenticate command (part 1, non-first authentication).

§ PHAL_MFP_CMD_AUTH2

#define PHAL_MFP_CMD_AUTH2   0x72

MFP Authenticate command (part 2).

§ PHAL_MFP_CMD_AUTH3

#define PHAL_MFP_CMD_AUTH3   0x74

MFP Authenticate command (part 3).

§ PHAL_MFP_CMD_RAUTH

#define PHAL_MFP_CMD_RAUTH   0x78

MFP ResetAuth command.

§ PHAL_MFP_CMD_READ_ENM

#define PHAL_MFP_CMD_READ_ENM   0x30

MFP Read Encrypted, No mac on response, Mac on command.

§ PHAL_MFP_CMD_READ_EMM

#define PHAL_MFP_CMD_READ_EMM   0x31

MFP Read Encrypted, Mac on response, Mac on command.

§ PHAL_MFP_CMD_READ_PNM

#define PHAL_MFP_CMD_READ_PNM   0x32

MFP Read Plain, No mac on response, Mac on command.

§ PHAL_MFP_CMD_READ_PMM

#define PHAL_MFP_CMD_READ_PMM   0x33

MFP Read Plain, Mac on response, Mac on command.

§ PHAL_MFP_CMD_READ_ENU

#define PHAL_MFP_CMD_READ_ENU   0x34

MFP Read Encrypted, No mac on response, Unmac'ed command.

§ PHAL_MFP_CMD_READ_EMU

#define PHAL_MFP_CMD_READ_EMU   0x35

MFP Read Encrypted, Mac on response, Unmac'ed command.

§ PHAL_MFP_CMD_READ_PNU

#define PHAL_MFP_CMD_READ_PNU   0x36

MFP Read Plain, No mac on response, Unmac'ed command.

§ PHAL_MFP_CMD_READ_PMU

#define PHAL_MFP_CMD_READ_PMU   0x37

MFP Read Plain, Mac on response, Unmac'ed command.

§ PHAL_MFP_CMD_WRITE_EN

#define PHAL_MFP_CMD_WRITE_EN   0xA0

MFP Write Encrypted, No mac on response, (Mac on command).

§ PHAL_MFP_CMD_WRITE_EM

#define PHAL_MFP_CMD_WRITE_EM   0xA1

MFP Write Encrypted, Mac on response, (Mac on command).

§ PHAL_MFP_CMD_WRITE_PN

#define PHAL_MFP_CMD_WRITE_PN   0xA2

MFP Write Plain, No mac on response, (Mac on command).

§ PHAL_MFP_CMD_WRITE_PM

#define PHAL_MFP_CMD_WRITE_PM   0xA3

MFP Write Plain, Mac on response, (Mac on command).

§ PHAL_MFP_CMD_WRITEPERSO

#define PHAL_MFP_CMD_WRITEPERSO   0xA8

MFP Write Perso.

§ PHAL_MFP_CMD_COMMITPERSO

#define PHAL_MFP_CMD_COMMITPERSO   0xAA

MFP Commit Perso.

§ PHAL_MFP_CMD_INCR

#define PHAL_MFP_CMD_INCR   0xB0

MFP Increment command.

§ PHAL_MFP_CMD_INCR_M

#define PHAL_MFP_CMD_INCR_M   0xB1

MFP Increment command MACed.

§ PHAL_MFP_CMD_DECR

#define PHAL_MFP_CMD_DECR   0xB2

MFP Decrement command.

§ PHAL_MFP_CMD_DECR_M

#define PHAL_MFP_CMD_DECR_M   0xB3

MFP Decrement command MACed.

§ PHAL_MFP_CMD_TRANS

#define PHAL_MFP_CMD_TRANS   0xB4

MFP Transfer command.

§ PHAL_MFP_CMD_TRANS_M

#define PHAL_MFP_CMD_TRANS_M   0xB5

MFP Transfer command MACed.

§ PHAL_MFP_CMD_INCRTR

#define PHAL_MFP_CMD_INCRTR   0xB6

MFP Increment Transfer command.

§ PHAL_MFP_CMD_INCRTR_M

#define PHAL_MFP_CMD_INCRTR_M   0xB7

MFP Increment Transfer command MACed.

§ PHAL_MFP_CMD_DECRTR

#define PHAL_MFP_CMD_DECRTR   0xB8

MFP Decrement Transfer command.

§ PHAL_MFP_CMD_DECRTR_M

#define PHAL_MFP_CMD_DECRTR_M   0xB9

MFP Decrement Transfer command MACed.

§ PHAL_MFP_CMD_REST

#define PHAL_MFP_CMD_REST   0xC2

MFP Restore command.

§ PHAL_MFP_CMD_REST_M

#define PHAL_MFP_CMD_REST_M   0xC3

MFP Restore command MACed.

§ PHAL_MFP_CMD_PPC

#define PHAL_MFP_CMD_PPC   0xF0

MFP Prepare Proximity Check.

§ PHAL_MFP_CMD_PC

#define PHAL_MFP_CMD_PC   0xF2

MFP Proximity Check command.

§ PHAL_MFP_CMD_VPC

#define PHAL_MFP_CMD_VPC   0xFD

MFP Verify Proximity Check command.

§ PHAL_MFP_CMD_MBREAD

#define PHAL_MFP_CMD_MBREAD   0x38

MFP Multi Block Read.

§ PHAL_MFP_CMD_MBWRITE

#define PHAL_MFP_CMD_MBWRITE   0xA8

MFP Multi Block Read.

§ PHAL_MFP_TRUNCATED_MAC_SIZE

#define PHAL_MFP_TRUNCATED_MAC_SIZE   8

Size of the truncated MAC.

§ PHAL_MFP_MIFARE_VALUE_BLOCK_SIZE

#define PHAL_MFP_MIFARE_VALUE_BLOCK_SIZE   4

Size of a MIFARE value block.

§ PHAL_MFP_MIFARE_BLOCK_SIZE

#define PHAL_MFP_MIFARE_BLOCK_SIZE   16

Size of the MIFARE blocks.

§ PHAL_MFP_PC_RND_LEN

#define PHAL_MFP_PC_RND_LEN   7

Size of the Proximity Check Random numbers.

§ PHAL_MFUL_PREAMBLE_TX

#define PHAL_MFUL_PREAMBLE_TX   0xAFU

MIFARE Ultralight preamble byte (tx) for authentication.

§ PHAL_MFUL_PREAMBLE_RX

#define PHAL_MFUL_PREAMBLE_RX   0x00U

MIFARE Ultralight preamble byte (rx) for authentication.

§ PHAL_MFUL_COMPWRITE_BLOCK_LENGTH

#define PHAL_MFUL_COMPWRITE_BLOCK_LENGTH   16U

Length of a compatibility write MIFARE(R) Ultralight data block.

§ PHAL_SLI_CMD_SET_EAS

#define PHAL_SLI_CMD_SET_EAS   0xA2

SLI-S/SLI-L This command enables the EAS mode if the EAS mode is not locked.

§ PHAL_SLI_CMD_RESET_EAS

#define PHAL_SLI_CMD_RESET_EAS   0xA3

SLI-S/SLI-L This command disables the EAS mode if the EAS mode is not locked.

§ PHAL_SLI_CMD_LOCK_EAS

#define PHAL_SLI_CMD_LOCK_EAS   0xA4

SLI-S/SLI-L This command locks the current state of the EAS mode and the EAS ID.

§ PHAL_SLI_CMD_EAS_ALARM

#define PHAL_SLI_CMD_EAS_ALARM   0xA5

SLI-S/SLI-L EAS Alarm command.

§ PHAL_SLI_CMD_PASSWORD_PROTECT_EAS

#define PHAL_SLI_CMD_PASSWORD_PROTECT_EAS   0xA6

SLI-S/SLI-L This command enables the password protection for EAS.

§ PHAL_SLI_CMD_WRITE_EAS_ID

#define PHAL_SLI_CMD_WRITE_EAS_ID   0xA7

SLI-S/SLI-L Write a new AES Identifier in the corresponding configuration memory.

§ PHAL_SLI_CMD_READ_EPC

#define PHAL_SLI_CMD_READ_EPC   0xA8

SLI-S Return the EPC data.

§ PHAL_SLI_CMD_GET_NXP_SYSTEM_INFOMATION

#define PHAL_SLI_CMD_GET_NXP_SYSTEM_INFOMATION   0xAB

SLIX2 Return the information about the IC access conditions and supported features.

§ PHAL_SLI_CMD_GET_RANDOM_NUMBER

#define PHAL_SLI_CMD_GET_RANDOM_NUMBER   0xB2

SLI-S/SLI-L Receive a random number from the label IC.

§ PHAL_SLI_CMD_SET_PASSWORD

#define PHAL_SLI_CMD_SET_PASSWORD   0xB3

SLI-S/SLI-L Set password to get access to different protected functionalities.

§ PHAL_SLI_CMD_WRITE_PASSWORD

#define PHAL_SLI_CMD_WRITE_PASSWORD   0xB4

SLI-S/SLI-L Write a new password into the related memory.

§ PHAL_SLI_CMD_LOCK_PASSWORD

#define PHAL_SLI_CMD_LOCK_PASSWORD   0xB5

SLI-S/SLI-L This command will lock the addressed password to prevent futur change.

§ PHAL_SLI_CMD_PROTECT_PAGE

#define PHAL_SLI_CMD_PROTECT_PAGE   0xB6

SLI-S Define the restriction to get access to the related page.

§ PHAL_SLI_CMD_LOCK_PAGE_PROTECT_COND

#define PHAL_SLI_CMD_LOCK_PAGE_PROTECT_COND   0xB7

SLI-S Lock the page protection condition.

§ PHAL_SLI_CMD_GET_MULT_BLOCK_PROT_ST

#define PHAL_SLI_CMD_GET_MULT_BLOCK_PROT_ST   0xB8

SLI-S Return the block protection status of the requested blocks.

§ PHAL_SLI_CMD_DESTROY_SLI

#define PHAL_SLI_CMD_DESTROY_SLI   0xB9

SLI-S/SLI-L This irreversible command destroys the label IC.

§ PHAL_SLI_CMD_ENABLE_PRIVACY

#define PHAL_SLI_CMD_ENABLE_PRIVACY   0xBA

SLI-S/SLI-L Enter into the privacy mode.

§ PHAL_SLI_CMD_64BIT_PASSWORD_PROTECT

#define PHAL_SLI_CMD_64BIT_PASSWORD_PROTECT   0xBB

SLI-S Lead to require both Rd and Wr passwords to get access to password protected blocks.

§ PHAL_SLI_CMD_READ_SIGNATURE

#define PHAL_SLI_CMD_READ_SIGNATURE   0xBD

SLI-S/SLI-L returns an IC specific, 32-byte ECC signature.

§ PHAL_T1T_CMD_WRITENOERASEBLOCK

#define PHAL_T1T_CMD_WRITENOERASEBLOCK   0x1BU

T1T Write_NE8 command byte.

§ PHAL_T1T_HEADER_ROM0

#define PHAL_T1T_HEADER_ROM0   0x10U

T1T Header Rom 0 byte to check.

§ PHAL_T1T_SW_READ_TIME_US

#define PHAL_T1T_SW_READ_TIME_US   91U

Read commands timeout in microseconds.

§ PHAL_T1T_SW_WRITE_ERASE_TIME_US

#define PHAL_T1T_SW_WRITE_ERASE_TIME_US   5236U

Write Erase commands timeout in microseconds.

§ PHAL_T1T_SW_WRITE_NO_ERASE_TIME_US

#define PHAL_T1T_SW_WRITE_NO_ERASE_TIME_US   2659U

Write No Erase commands timeout in microseconds.

§ PHAL_T1T_SW_EXT_TIME_US

#define PHAL_T1T_SW_EXT_TIME_US   200U

Time extension in microseconds.

§ PHPAL_FELICA_SW_CMD_REQC

#define PHPAL_FELICA_SW_CMD_REQC   0x00U

RequestC.

§ PHPAL_FELICA_SW_CMD_REQ_RESP

#define PHPAL_FELICA_SW_CMD_REQ_RESP   0x04U

Request Response.

§ PHPAL_FELICA_SW_CMD_REQ_SERVICE

#define PHPAL_FELICA_SW_CMD_REQ_SERVICE   0x02U

Request Service.

§ PHPAL_FELICA_SW_CMD_READ

#define PHPAL_FELICA_SW_CMD_READ   0x06U

Read.

§ PHPAL_FELICA_SW_CMD_WRITE

#define PHPAL_FELICA_SW_CMD_WRITE   0x08U

Write.

§ PHPAL_FELICA_SW_CMD_AUTH1

#define PHPAL_FELICA_SW_CMD_AUTH1   0x10U

Authentication1.

§ PHPAL_FELICA_SW_CMD_AUTH2

#define PHPAL_FELICA_SW_CMD_AUTH2   0x12U

Authentication2.

§ PHPAL_FELICA_SW_CMD_READ_SECF

#define PHPAL_FELICA_SW_CMD_READ_SECF   0x14U

Read from secure file.

§ PHPAL_FELICA_SW_CMD_WRITE_SECF

#define PHPAL_FELICA_SW_CMD_WRITE_SECF   0x16U

Write to secure file.

§ PHPAL_FELICA_SW_RSP_REQC

#define PHPAL_FELICA_SW_RSP_REQC   0x01U

Response to RequestC.

§ PHPAL_FELICA_SW_LEN_BYTE_SIZE

#define PHPAL_FELICA_SW_LEN_BYTE_SIZE   0x01U

Size of Length byte in RequestC response.

§ PHPAL_FELICA_SW_RESP_REQC_SIZE

#define PHPAL_FELICA_SW_RESP_REQC_SIZE   0x01U

Length of Response byte in RequestC response.

§ PHPAL_FELICA_SW_FLAG_ERROR

#define PHPAL_FELICA_SW_FLAG_ERROR   0x01U

Error Flag.

§ PHPAL_FELICA_SW_FLAG_ADDRESSED

#define PHPAL_FELICA_SW_FLAG_ADDRESSED   0x20U

Addressed Flag.

§ PHPAL_FELICA_SW_FLAG_SELECTED

#define PHPAL_FELICA_SW_FLAG_SELECTED   0x10U

Selected Flag.

§ PHPAL_FELICA_SW_IDMPMM_VALID

#define PHPAL_FELICA_SW_IDMPMM_VALID   0x01U

Stored UID is valid.

§ PHPAL_FELICA_SW_IDMPMM_INVALID

#define PHPAL_FELICA_SW_IDMPMM_INVALID   0x00U

Stored UID is not valid.

§ PHPAL_FELICA_SW_RESP_FRAME_SIZE

#define PHPAL_FELICA_SW_RESP_FRAME_SIZE   32U

Size of one Felica Response Frame.

§ PHPAL_FELICA_SW_EXT_TIME_US

#define PHPAL_FELICA_SW_EXT_TIME_US   500U

Time extension in microseconds for all commands.

§ PHPAL_I14443P3A_EXT_TIME_US

#define PHPAL_I14443P3A_EXT_TIME_US   60

Time extension in microseconds for all commands.

§ PHPAL_I14443P3B_SW_ATQB_TIME_US

#define PHPAL_I14443P3B_SW_ATQB_TIME_US   600

TR0 + TR1 (ISO14443-2 9.2.5 75,5 + 94,4 ~ 170 –> set 200 us).

§ PHPAL_I14443P3B_SW_DELTA_POLL

#define PHPAL_I14443P3B_SW_DELTA_POLL   17

T(B,POLL) (Digital Protocol Ver1.1 (Article 7.9.1.5) is 16.4ms = ~17ms).

§ PHPAL_I14443P3B_SW_ATTRIB_TIME_US

#define PHPAL_I14443P3B_SW_ATTRIB_TIME_US   4800

Answer to ATTRIB FWT (ISO14443-3 7.9.4.3).

§ PHPAL_I14443P3B_SW_EXT_TIME_US

#define PHPAL_I14443P3B_SW_EXT_TIME_US   63

Time extension in microseconds for all commands.

§ PHPAL_I14443P3B_FRAMESIZE_MAX

#define PHPAL_I14443P3B_FRAMESIZE_MAX   12

The maximum allowed FSDI/FSCI value.

§ PHPAL_I14443P3B_SW_TXWAIT_US_TR2_0

#define PHPAL_I14443P3B_SW_TXWAIT_US_TR2_0   133U

Minimum TxWait in case received TR2 value is (00)b.

§ PHPAL_I14443P3B_SW_TXWAIT_US_TR2_1

#define PHPAL_I14443P3B_SW_TXWAIT_US_TR2_1   246U

Minimum TxWait in case received TR2 value is (01)b.

§ PHPAL_I14443P3B_SW_TXWAIT_US_TR2_2

#define PHPAL_I14443P3B_SW_TXWAIT_US_TR2_2   397U

Minimum TxWait in case received TR2 value is (10)b.

§ PHPAL_I14443P3B_SW_TXWAIT_US_TR2_3

#define PHPAL_I14443P3B_SW_TXWAIT_US_TR2_3   699U

Minimum TxWait in case received TR2 value is (11)b.

§ PHPAL_I14443P3B_SW_MINIMUM_TR2_MASK

#define PHPAL_I14443P3B_SW_MINIMUM_TR2_MASK   0x06U

Minimum TR2 Mask to extract TR2 value.

§ PHPAL_I14443P3B_SW_MINIMUM_TR2_POS

#define PHPAL_I14443P3B_SW_MINIMUM_TR2_POS   1U

TR2 position.

§ PHPAL_I14443P3B_SW_MINIMUM_TR2_VALUE_0

#define PHPAL_I14443P3B_SW_MINIMUM_TR2_VALUE_0   0U

TR2 bit value (00)b.

§ PHPAL_I14443P3B_SW_MINIMUM_TR2_VALUE_1

#define PHPAL_I14443P3B_SW_MINIMUM_TR2_VALUE_1   1U

TR2 bit value (01)b.

§ PHPAL_I14443P3B_SW_MINIMUM_TR2_VALUE_2

#define PHPAL_I14443P3B_SW_MINIMUM_TR2_VALUE_2   2U

TR2 bit value (10)b.

§ PHPAL_I14443P3B_SW_MINIMUM_TR2_VALUE_3

#define PHPAL_I14443P3B_SW_MINIMUM_TR2_VALUE_3   3U

TR2 bit value (11)b.

§ PHPAL_I14443P4_EXT_TIME_US

#define PHPAL_I14443P4_EXT_TIME_US   60

Time extension in microseconds for all commands.

§ PHPAL_I14443P4A_SAMAV2_X_PPSS

#define PHPAL_I14443P4A_SAMAV2_X_PPSS   0xD0U

PPS Command code.

§ PHPAL_I14443P4A_SAMAV2_X_PPS0

#define PHPAL_I14443P4A_SAMAV2_X_PPS0   0x11U

PPS0 code.

§ PHPAL_I14443P4A_SAMAV2_X_ATS_LEN

#define PHPAL_I14443P4A_SAMAV2_X_ATS_LEN   0

Position of LEN within ATS.

§ PHPAL_I14443P4A_SAMAV2_X_ATS_T0

#define PHPAL_I14443P4A_SAMAV2_X_ATS_T0   1

Position of T0 within ATS.

§ PHPAL_I14443P4A_SAMAV2_X_ATS_TA1_PRESENT

#define PHPAL_I14443P4A_SAMAV2_X_ATS_TA1_PRESENT   0x10U

Bit which signals TA(1) presence.

§ PHPAL_I14443P4A_SAMAV2_X_ATS_TB1_PRESENT

#define PHPAL_I14443P4A_SAMAV2_X_ATS_TB1_PRESENT   0x20U

Bit which signals TB(1) presence.

§ PHPAL_I14443P4A_SAMAV2_X_ATS_TC1_PRESENT

#define PHPAL_I14443P4A_SAMAV2_X_ATS_TC1_PRESENT   0x40U

Bit which signals TC(1) presence.

§ PHPAL_I14443P4A_SAMAV2_X_ATS_TC1_NAD_SUPPORT

#define PHPAL_I14443P4A_SAMAV2_X_ATS_TC1_NAD_SUPPORT   0x01U

Bit within TC(1) which signals NAD support.

§ PHPAL_I14443P4A_SAMAV2_X_ATS_TC1_CID_SUPPORT

#define PHPAL_I14443P4A_SAMAV2_X_ATS_TC1_CID_SUPPORT   0x02U

Bit within TC(1) which signals CID support.

§ PHPAL_I14443P4A_SAMAV2_X_FWI_DEFAULT

#define PHPAL_I14443P4A_SAMAV2_X_FWI_DEFAULT   0x04U

FWI default value.

§ PHPAL_I14443P4A_SAMAV2_X_FSCI_DEFAULT

#define PHPAL_I14443P4A_SAMAV2_X_FSCI_DEFAULT   0x02U

FSCI default value.

§ PHPAL_I14443P4A_SW_HALT_CMD

#define PHPAL_I14443P4A_SW_HALT_CMD   0x50U

HltA Command code.

§ PHPAL_I14443P4A_SW_RATS

#define PHPAL_I14443P4A_SW_RATS   0xE0U

Rats Command code.

§ PHPAL_I14443P4A_SW_PPSS

#define PHPAL_I14443P4A_SW_PPSS   0xD0U

PPS Command code.

§ PHPAL_I14443P4A_SW_PPS0

#define PHPAL_I14443P4A_SW_PPS0   0x11U

PPS0 code.

§ PHPAL_I14443P4A_SW_S_BLOCK

#define PHPAL_I14443P4A_SW_S_BLOCK   0xC0U

ISO 14443-4 S-Block.

§ PHPAL_I14443P4A_SW_S_BLOCK_RFU_BITS

#define PHPAL_I14443P4A_SW_S_BLOCK_RFU_BITS   0x02U

ISO 14443-4 S-Block RFU bits.

§ PHPAL_I14443P4A_SW_PCB_CID_FOLLOWING

#define PHPAL_I14443P4A_SW_PCB_CID_FOLLOWING   0x08U

Bit within PCB which signals presence of CID byte .

§ PHPAL_I14443P4A_SW_PCB_DESELECT

#define PHPAL_I14443P4A_SW_PCB_DESELECT   0x00U

Bits within PCB which signal a DESELECT command.

§ PHPAL_I14443P4A_SW_FWT_ACTIVATION_US

#define PHPAL_I14443P4A_SW_FWT_ACTIVATION_US   5286

Activation FTW in microseconds.

§ PHPAL_I14443P4A_SW_ATS_T0

#define PHPAL_I14443P4A_SW_ATS_T0   1

Position of T0 within ATS.

§ PHPAL_I14443P4A_SW_ATS_TA1_PRESENT

#define PHPAL_I14443P4A_SW_ATS_TA1_PRESENT   0x10U

Bit which signals TA(1) presence.

§ PHPAL_I14443P4A_SW_ATS_TB1_PRESENT

#define PHPAL_I14443P4A_SW_ATS_TB1_PRESENT   0x20U

Bit which signals TB(1) presence.

§ PHPAL_I14443P4A_SW_ATS_TC1_PRESENT

#define PHPAL_I14443P4A_SW_ATS_TC1_PRESENT   0x40U

Bit which signals TC(1) presence.

§ PHPAL_I14443P4A_SW_ATS_TC1_NAD_SUPPORT

#define PHPAL_I14443P4A_SW_ATS_TC1_NAD_SUPPORT   0x01U

Bit within TC(1) which signals NAD support.

§ PHPAL_I14443P4A_SW_ATS_TC1_CID_SUPPORT

#define PHPAL_I14443P4A_SW_ATS_TC1_CID_SUPPORT   0x02U

Bit within TC(1) which signals CID support.

§ PHPAL_I14443P4A_SW_FWI_DEFAULT

#define PHPAL_I14443P4A_SW_FWI_DEFAULT   0x04U

FWI default value.

§ PHPAL_I14443P4A_SW_SFGI_DEFAULT

#define PHPAL_I14443P4A_SW_SFGI_DEFAULT   0x00U

SFGI default value.

§ PHPAL_I14443P4A_SW_FSCI_DEFAULT

#define PHPAL_I14443P4A_SW_FSCI_DEFAULT   0x02U

FSCI default value.

§ PHPAL_I14443P4A_SW_FWT_MIN_US

#define PHPAL_I14443P4A_SW_FWT_MIN_US   303

FTW min in microseconds.

§ PHPAL_I14443P4A_SW_HALT_TIME_US

#define PHPAL_I14443P4A_SW_HALT_TIME_US   1100U

Wait time for halt command in microseconds.

§ PHPAL_I14443P4A_SW_EXT_TIME_US

#define PHPAL_I14443P4A_SW_EXT_TIME_US   60

Time extension in microseconds for all commands.

§ PHPAL_I14443P4A_FRAMESIZE_MAX

#define PHPAL_I14443P4A_FRAMESIZE_MAX   12

The maximum allowed FSDI/FSCI value as per ISO.

§ PHPAL_I14443P4A_EMVCO_FRAMESIZE_MAX

#define PHPAL_I14443P4A_EMVCO_FRAMESIZE_MAX   8

The maximum allowed FSDI/FSCI value as per Emvco and NfcForum.

§ PHPAL_I18000P3M3_CMD_SELECT

#define PHPAL_I18000P3M3_CMD_SELECT   0x0A

Select command code.

§ PHPAL_I18000P3M3_CMD_BEGIN_ROUND

#define PHPAL_I18000P3M3_CMD_BEGIN_ROUND   0x08

BeginRound command code.

§ PHPAL_I18000P3M3_CMD_RESIZE_ROUND

#define PHPAL_I18000P3M3_CMD_RESIZE_ROUND   0x09

ResizeRound command code.

§ PHPAL_I18000P3M3_CMD_NEXT_SLOT

#define PHPAL_I18000P3M3_CMD_NEXT_SLOT   0x00

NextSlot command code.

§ PHPAL_I18000P3M3_CMD_ACK

#define PHPAL_I18000P3M3_CMD_ACK   0x01

ACK command code.

§ PHPAL_I18000P3M3_CMD_NAK

#define PHPAL_I18000P3M3_CMD_NAK   0xC0

NAK command code.

§ PHPAL_I18092MPI_SW_IS_INVALID_BLOCK_STATUS

#define PHPAL_I18092MPI_SW_IS_INVALID_BLOCK_STATUS (   bStatus)
Value:
(( \
(((bStatus) & PH_ERR_MASK) == PH_ERR_IO_TIMEOUT) || \
(((bStatus) & PH_ERR_MASK) == PH_ERR_INTEGRITY_ERROR) || \
(((bStatus) & PH_ERR_MASK) == PH_ERR_FRAMING_ERROR) || \
(((bStatus) & PH_ERR_MASK) == PH_ERR_COLLISION_ERROR)) \
? 1 : 0 \
)
#define PH_ERR_COLLISION_ERROR
A collision occurred.
Definition: ph_Status.h:70
#define PH_ERR_FRAMING_ERROR
Invalid frame format.
Definition: ph_Status.h:72
#define PH_ERR_INTEGRITY_ERROR
Wrong CRC or parity detected.
Definition: ph_Status.h:69
#define PH_ERR_IO_TIMEOUT
No reply received, e.g.
Definition: ph_Status.h:68
#define PH_ERR_MASK
Error Mask for status code.
Definition: ph_Status.h:157

Macro which checks for invalid block status.

§ PHPAL_I18092MPI_SW_IS_TIMEOUT

#define PHPAL_I18092MPI_SW_IS_TIMEOUT (   bPfb)
Value:
(( \
? 1 : 0 \
)
#define PHPAL_I18092MPI_SW_PFB_OPTION_MASK
Bit mask within PDU for getting option field (NACK/ACK or ATTENTION/RTOS or MI).
Definition: phpalI18092mPI_Sw_Int.h:197
#define PHPAL_I18092MPI_SW_PFB_PDU_TYPE_MASK
Bit mask within PFB to get type of PDU.
Definition: phpalI18092mPI_Sw_Int.h:185
#define PHPAL_I18092MPI_SW_PFB_SUPERVISORY_PDU_MASK
Bit mask within PFB identifying a supervisory PDU.
Definition: phpalI18092mPI_Sw_Int.h:182

Macro which checks if given PDU is timeout PDU.

§ PHPAL_I18092MPI_SW_IS_ATTENTION

#define PHPAL_I18092MPI_SW_IS_ATTENTION (   bPfb)
Value:
(( \
(((bPfb) & PHPAL_I18092MPI_SW_PFB_OPTION_MASK) == 0x00)) \
? 1 : 0 \
)
#define PHPAL_I18092MPI_SW_PFB_OPTION_MASK
Bit mask within PDU for getting option field (NACK/ACK or ATTENTION/RTOS or MI).
Definition: phpalI18092mPI_Sw_Int.h:197
#define PHPAL_I18092MPI_SW_PFB_PDU_TYPE_MASK
Bit mask within PFB to get type of PDU.
Definition: phpalI18092mPI_Sw_Int.h:185
#define PHPAL_I18092MPI_SW_PFB_SUPERVISORY_PDU_MASK
Bit mask within PFB identifying a supervisory PDU.
Definition: phpalI18092mPI_Sw_Int.h:182

Macro which checks if given PDU is ATN PDU.

§ PHPAL_I18092MPI_SW_IS_ACK

#define PHPAL_I18092MPI_SW_IS_ACK (   bPfb)
Value:
(( \
(((bPfb) & PHPAL_I18092MPI_SW_PFB_OPTION_MASK) == 0x00)) \
? 1 : 0 \
)
#define PHPAL_I18092MPI_SW_PFB_OPTION_MASK
Bit mask within PDU for getting option field (NACK/ACK or ATTENTION/RTOS or MI).
Definition: phpalI18092mPI_Sw_Int.h:197
#define PHPAL_I18092MPI_SW_PFB_ACK_PDU_MASK
Bit mask within PFB identifying an ACK/NACK PDU.
Definition: phpalI18092mPI_Sw_Int.h:179
#define PHPAL_I18092MPI_SW_PFB_PDU_TYPE_MASK
Bit mask within PFB to get type of PDU.
Definition: phpalI18092mPI_Sw_Int.h:185

Macro which checks if given PDU is ACK PDU.

§ PHPAL_I18092MPI_SW_IS_NACK

#define PHPAL_I18092MPI_SW_IS_NACK (   bPfb)
Value:
(( \
? 1 : 0 \
)
#define PHPAL_I18092MPI_SW_PFB_OPTION_MASK
Bit mask within PDU for getting option field (NACK/ACK or ATTENTION/RTOS or MI).
Definition: phpalI18092mPI_Sw_Int.h:197
#define PHPAL_I18092MPI_SW_PFB_ACK_PDU_MASK
Bit mask within PFB identifying an ACK/NACK PDU.
Definition: phpalI18092mPI_Sw_Int.h:179
#define PHPAL_I18092MPI_SW_PFB_PDU_TYPE_MASK
Bit mask within PFB to get type of PDU.
Definition: phpalI18092mPI_Sw_Int.h:185

Macro which checks if given PDU is NACK PDU.

§ PHPAL_I18092MPI_SW_IS_CHAINING

#define PHPAL_I18092MPI_SW_IS_CHAINING (   bPfb)
Value:
(( \
? 1 : 0 \
)
#define PHPAL_I18092MPI_SW_PFB_INFORMATION_PDU_MASK
Bit mask within PFB identifying an information PDU.
Definition: phpalI18092mPI_Sw_Int.h:176
#define PHPAL_I18092MPI_SW_PFB_OPTION_MASK
Bit mask within PDU for getting option field (NACK/ACK or ATTENTION/RTOS or MI).
Definition: phpalI18092mPI_Sw_Int.h:197
#define PHPAL_I18092MPI_SW_PFB_PDU_TYPE_MASK
Bit mask within PFB to get type of PDU.
Definition: phpalI18092mPI_Sw_Int.h:185

Macro which checks if given I-PDU is chaining.

§ PHPAL_I18092MPI_SW_IS_NOT_CHAINING

#define PHPAL_I18092MPI_SW_IS_NOT_CHAINING (   bPfb)
Value:
(( \
(((bPfb) & PHPAL_I18092MPI_SW_PFB_OPTION_MASK) == 0x00)) \
? 1 : 0 \
)
#define PHPAL_I18092MPI_SW_PFB_INFORMATION_PDU_MASK
Bit mask within PFB identifying an information PDU.
Definition: phpalI18092mPI_Sw_Int.h:176
#define PHPAL_I18092MPI_SW_PFB_OPTION_MASK
Bit mask within PDU for getting option field (NACK/ACK or ATTENTION/RTOS or MI).
Definition: phpalI18092mPI_Sw_Int.h:197
#define PHPAL_I18092MPI_SW_PFB_PDU_TYPE_MASK
Bit mask within PFB to get type of PDU.
Definition: phpalI18092mPI_Sw_Int.h:185

Macro which checks if given I-PDU is not chaining.

§ PHPAL_I18092MPI_SW_IS_INFORMATION_PDU

#define PHPAL_I18092MPI_SW_IS_INFORMATION_PDU (   bPfb)
Value:
( \
? 1 : 0 \
)
#define PHPAL_I18092MPI_SW_PFB_INFORMATION_PDU_MASK
Bit mask within PFB identifying an information PDU.
Definition: phpalI18092mPI_Sw_Int.h:176
#define PHPAL_I18092MPI_SW_PFB_PDU_TYPE_MASK
Bit mask within PFB to get type of PDU.
Definition: phpalI18092mPI_Sw_Int.h:185

Macro which checks if given PDU is an I-PDU.

§ PHPAL_I18092MPI_SW_INCREMENT_PNI

#define PHPAL_I18092MPI_SW_INCREMENT_PNI (   bPni)    (((bPni) == 3) ? 0 : ((bPni) + 1))

Macro used to increment PNI.

§ PHPAL_I18092MPI_SW_START_BYTE

#define PHPAL_I18092MPI_SW_START_BYTE   0xF0U

Start Byte to be added to the protocol header in case underlying protocol is ISO14443.

§ PHPAL_I18092MPI_SW_CMD_REQUEST

#define PHPAL_I18092MPI_SW_CMD_REQUEST   0xD4U

Request command code.

§ PHPAL_I18092MPI_SW_CMD_RESPONSE

#define PHPAL_I18092MPI_SW_CMD_RESPONSE   0xD5U

Response command code.

§ PHPAL_I18092MPI_SW_CMD_ATR_REQ

#define PHPAL_I18092MPI_SW_CMD_ATR_REQ   0x00U

Attribute request command code.

§ PHPAL_I18092MPI_SW_ATR_PPI_LRI_BIT

#define PHPAL_I18092MPI_SW_ATR_PPI_LRI_BIT   0x04U

Bit position of LRi field within PPi byte for attribute request command.

§ PHPAL_I18092MPI_SW_CMD_ATR_RES

#define PHPAL_I18092MPI_SW_CMD_ATR_RES   0x01U

Attribute response command code.

§ PHPAL_I18092MPI_SW_CMD_PSL_REQ

#define PHPAL_I18092MPI_SW_CMD_PSL_REQ   0x04U

Parameter select request command code.

§ PHPAL_I18092MPI_SW_CMD_PSL_RES

#define PHPAL_I18092MPI_SW_CMD_PSL_RES   0x05U

Parameter select response command code.

§ PHPAL_I18092MPI_SW_CMD_DEP_REQ

#define PHPAL_I18092MPI_SW_CMD_DEP_REQ   0x06U

Data exchange protocol request command code.

§ PHPAL_I18092MPI_SW_CMD_DEP_RES

#define PHPAL_I18092MPI_SW_CMD_DEP_RES   0x07U

Data exchange protocol response command code.

§ PHPAL_I18092MPI_SW_CMD_DSL_REQ

#define PHPAL_I18092MPI_SW_CMD_DSL_REQ   0x08U

Deselect request command code.

§ PHPAL_I18092MPI_SW_CMD_DSL_RES

#define PHPAL_I18092MPI_SW_CMD_DSL_RES   0x09U

Deselect response command code.

§ PHPAL_I18092MPI_SW_CMD_RLS_REQ

#define PHPAL_I18092MPI_SW_CMD_RLS_REQ   0x0AU

Release request command code.

§ PHPAL_I18092MPI_SW_CMD_RLS_RES

#define PHPAL_I18092MPI_SW_CMD_RLS_RES   0x0BU

Release response command code.

§ PHPAL_I18092MPI_SW_CMD_WUP_REQ

#define PHPAL_I18092MPI_SW_CMD_WUP_REQ   0x02U

Wakeup request command code.

§ PHPAL_I18092MPI_SW_CMD_WUP_RES

#define PHPAL_I18092MPI_SW_CMD_WUP_RES   0x03U

Wakeup response command code.

§ PHPAL_I18092MPI_SW_ATR_RES_NFCID3_POS

#define PHPAL_I18092MPI_SW_ATR_RES_NFCID3_POS   0x02U

Position of NFCID3 within ATR_RES.

§ PHPAL_I18092MPI_SW_ATR_RES_DID_POS

#define PHPAL_I18092MPI_SW_ATR_RES_DID_POS   12U

Position of DID within ATR_RES.

§ PHPAL_I18092MPI_SW_ATR_RES_BST_POS

#define PHPAL_I18092MPI_SW_ATR_RES_BST_POS   13U

Position of BS(T) within ATR_RES.

§ PHPAL_I18092MPI_SW_ATR_RES_BRT_POS

#define PHPAL_I18092MPI_SW_ATR_RES_BRT_POS   14U

Position of BR(T) within ATR_RES.

§ PHPAL_I18092MPI_SW_ATR_RES_TO_POS

#define PHPAL_I18092MPI_SW_ATR_RES_TO_POS   15U

Position of TO within ATR_RES.

§ PHPAL_I18092MPI_SW_ATR_RES_PPT_POS

#define PHPAL_I18092MPI_SW_ATR_RES_PPT_POS   16U

Position of PP(T) within ATR_RES.

§ PHPAL_I18092MPI_SW_ATR_RES_PPT_GT_AVAILABLE

#define PHPAL_I18092MPI_SW_ATR_RES_PPT_GT_AVAILABLE   0x02U

Gt_available bit within PP(T) byte of ATR_RES.

§ PHPAL_I18092MPI_SW_ATR_RES_PPT_NAD_USED

#define PHPAL_I18092MPI_SW_ATR_RES_PPT_NAD_USED   0x01U

NAD_used bit within PP(T) byte of ATR_RES.

§ PHPAL_I18092MPI_SW_PFB_INFORMATION_PDU_MASK

#define PHPAL_I18092MPI_SW_PFB_INFORMATION_PDU_MASK   0x00U

Bit mask within PFB identifying an information PDU.

§ PHPAL_I18092MPI_SW_PFB_ACK_PDU_MASK

#define PHPAL_I18092MPI_SW_PFB_ACK_PDU_MASK   0x40U

Bit mask within PFB identifying an ACK/NACK PDU.

§ PHPAL_I18092MPI_SW_PFB_SUPERVISORY_PDU_MASK

#define PHPAL_I18092MPI_SW_PFB_SUPERVISORY_PDU_MASK   0x80U

Bit mask within PFB identifying a supervisory PDU.

§ PHPAL_I18092MPI_SW_PFB_PDU_TYPE_MASK

#define PHPAL_I18092MPI_SW_PFB_PDU_TYPE_MASK   0xE0U

Bit mask within PFB to get type of PDU.

§ PHPAL_I18092MPI_SW_PFB_NAD_MASK

#define PHPAL_I18092MPI_SW_PFB_NAD_MASK   0x08U

Bit mask within PFB for checking NAD enabler.

§ PHPAL_I18092MPI_SW_PFB_DID_MASK

#define PHPAL_I18092MPI_SW_PFB_DID_MASK   0x04U

Bit mask within PFB for checking DID enabler.

§ PHPAL_I18092MPI_SW_PFB_PNI_MASK

#define PHPAL_I18092MPI_SW_PFB_PNI_MASK   0x03U

Bit mask within PFB for getting PNI.

§ PHPAL_I18092MPI_SW_PFB_OPTION_MASK

#define PHPAL_I18092MPI_SW_PFB_OPTION_MASK   0x10U

Bit mask within PDU for getting option field (NACK/ACK or ATTENTION/RTOS or MI).

§ PHPAL_I18092MPI_SW_DELTA_T_INITIATOR_MS

#define PHPAL_I18092MPI_SW_DELTA_T_INITIATOR_MS   100U

Activation response waiting time in milliseconds, NFCForum-TS-DigitalProtocol-1.0 section A.10.

§ PHPAL_I18092MPI_SW_DELTA_RWT_US

#define PHPAL_I18092MPI_SW_DELTA_RWT_US   2U

Time extension in microseconds for all commands, NFCForum-TS-DigitalProtocol-1.0 section A.10.

§ PHPAL_I18092MPI_SW_RWT_ACTIVATION_MS

#define PHPAL_I18092MPI_SW_RWT_ACTIVATION_MS   1239U

Activation response waiting time in milliseconds, NFCForum-TS-DigitalProtocol-1.0 section A.10.

deltaRWT is included in this case.

§ PHPAL_I18092MPI_SW_RWT_MIN_US

#define PHPAL_I18092MPI_SW_RWT_MIN_US   302U

Minimum response waiting time, ISO/IEC 18092:2004(E) section 12.5.1.2.1.

§ PHPAL_I18092MPI_SW_TIRFG_MIN_MS

#define PHPAL_I18092MPI_SW_TIRFG_MIN_MS   5U

Minimum initial RF guard time before retry of ATR_REQ.

§ PHPAL_I18092MPI_SW_MIN_FRAMESIZE

#define PHPAL_I18092MPI_SW_MIN_FRAMESIZE   3U

Minimum frame size, NFCForum-TS-DigitalProtocol-1.0.

§ PHPAL_I18092MPI_SW_MAX_FRAMESIZE

#define PHPAL_I18092MPI_SW_MAX_FRAMESIZE   255U

Maximum frame size, NFCForum-TS-DigitalProtocol-1.0.

§ PHPAL_I18092MPI_SW_RETRIES_DEFAULT

#define PHPAL_I18092MPI_SW_RETRIES_DEFAULT   2U

Default (=minimum) Maximum Retry count, NFCForum-TS-DigitalProtocol-1.0 section A.10.

§ PHPAL_I18092MPI_SW_MIN_ACTIVATION_FRAME_LENGTH

#define PHPAL_I18092MPI_SW_MIN_ACTIVATION_FRAME_LENGTH   17U

Frame length must be min.

17 bytes during activation. (NFCForum-TS-DigitalProtocol-1.0, section 14.6.1.1.

§ PHPAL_I18092MPI_SW_MAX_ACTIVATION_FRAME_LENGTH

#define PHPAL_I18092MPI_SW_MAX_ACTIVATION_FRAME_LENGTH   64U

Frame length is limited to 64 bytes during activation.

(NFCForum-TS-DigitalProtocol-1.0, section 14.6.1.1.

§ PHPAL_I18092MPI_SW_STATE_INFORMATION_PDU_TX

#define PHPAL_I18092MPI_SW_STATE_INFORMATION_PDU_TX   0x00U

State information PDU to be transmitted.

§ PHPAL_I18092MPI_SW_STATE_ACK_PDU_TX

#define PHPAL_I18092MPI_SW_STATE_ACK_PDU_TX   0x01U

State ACK PDU to be transmitted.

§ PHPAL_I18092MPI_SW_STATE_INFORMATION_PDU_RX

#define PHPAL_I18092MPI_SW_STATE_INFORMATION_PDU_RX   0x02U

State information PDU to be received.

§ PHPAL_I18092MPI_SW_STATE_FINISHED

#define PHPAL_I18092MPI_SW_STATE_FINISHED   0x03U

Finished state.

§ PHPAL_I18092MPI_SW_STATE_MASK

#define PHPAL_I18092MPI_SW_STATE_MASK   0x0FU

State mask.

§ PHPAL_I18092MPI_SW_STATE_RETRANSMIT_BIT

#define PHPAL_I18092MPI_SW_STATE_RETRANSMIT_BIT   0x10U

Retransmission of information PDU.

§ PHPAL_I18092MPI_SW_STATE_CHAINING_BIT

#define PHPAL_I18092MPI_SW_STATE_CHAINING_BIT   0x20U

Information PDU is chaining.

§ PHPAL_I18092MPI_SW_STATE_CHAINING_FIRST_BIT

#define PHPAL_I18092MPI_SW_STATE_CHAINING_FIRST_BIT   0x40U

Information PDU is first block in chain.

§ PHPAL_I18092MPI_SW_STATE_CHAINING_LAST_BIT

#define PHPAL_I18092MPI_SW_STATE_CHAINING_LAST_BIT   0x80U

Information PDU is last block in chain.

§ PHPAL_SLI15693_SW_NXP_MFG_CODE

#define PHPAL_SLI15693_SW_NXP_MFG_CODE   0x04U

IC Manufacturer Code of NXP.

§ PHPAL_SLI15693_SW_EXT_TIME_US

#define PHPAL_SLI15693_SW_EXT_TIME_US   60

Time extension in microseconds for all commands.

§ PHPAL_SLI15693_SW_UID_COMPLETE

#define PHPAL_SLI15693_SW_UID_COMPLETE   64U

UID length in bits when complete.

§ PHPAL_SLI15693_SW_FLAGS_DEFAULT

#define PHPAL_SLI15693_SW_FLAGS_DEFAULT   0x06U

Default flags (DATA_RATE and INVENTORY BIT is set).

Function Documentation

§ phalI18000p3m3_Sw_ParseError()

phStatus_t phalI18000p3m3_Sw_ParseError ( phalI18000p3m3_Sw_DataParams_t pDataParams,
uint8_t pRxData,
uint16_t  wRxDataLength,
uint8_t  bRxLastBits 
)

Parse received error frame.

Returns
Status code
Return values
PHAL_I18000P3M3_ERR_OTHER
PHAL_I18000P3M3_ERR_MEMORY_OVERRUN
PHAL_I18000P3M3_ERR_MEMORY_LOCKED
PHAL_I18000P3M3_ERR_INSUFFICIENT_POWER
PHAL_I18000P3M3_ERR_NON_SPECIFIC
PH_ERR_PROTOCOL_ERROREither length or Handle does not match.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]pRxDataReceived data.
[in]wRxDataLengthLength of received data in bytes.
[in]bRxLastBitsValid bits of last byte of RxData.

§ phalMfc_Int_Transfer()

phStatus_t phalMfc_Int_Transfer ( void *  pPalMifareDataParams,
uint8_t  bBlockNo 
)

Perform MIFARE(R) Transfer command with MIFARE Picc.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pPalMifareDataParamsPointer to a palMifare component context.
[in]bBlockNoblock number the transfer buffer shall be transferred to.

§ phalMfc_Int_Value()

phStatus_t phalMfc_Int_Value ( void *  pPalMifareDataParams,
uint8_t  bCmdCode,
uint8_t  bBlockNo,
uint8_t pValue 
)

Perform a MIFARE(R) Value operation with MIFARE Picc.

This is used by INCREMENT, DECREMENT and RESTORE commands.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pPalMifareDataParamsPointer to a palMifare component context.
[in]bCmdCodeCommand Code - INC/DEC or RST.
[in]bBlockNoBlock Number.
[in]pValueValue; (Needs to be zero in case of RST command).

§ phalMfc_Int_CreateValueBlock()

phStatus_t phalMfc_Int_CreateValueBlock ( uint8_t pValue,
uint8_t  bAddrData,
uint8_t pBlock 
)

Create a Value block for a given value/addr pair.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pValueValue to be converted.
[in]bAddrDatabAddrData containing destination address.
[out]pBlockFormatted Value block.

§ phalMfc_Int_CheckValueBlockFormat()

phStatus_t phalMfc_Int_CheckValueBlockFormat ( uint8_t pBlock)

Check value block format of a given block.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pBlockFormatted Value block.

§ phalMfc_Int_ResolveReturnCode()

phStatus_t phalMfc_Int_ResolveReturnCode ( uint8_t  bRetCode)

Resolve MIFARE(R) error code from response.

Returns
Status code
Return values
PH_ERR_SUCCESSACK received.
PHPAL_MIFARE_ERR_NAK0NAK0 received.
PHPAL_MIFARE_ERR_NAK1NAK1 received.
PHPAL_MIFARE_ERR_NAK4NAK4 received.
PHPAL_MIFARE_ERR_NAK5NAK5 received.
PH_ERR_PROTOCOL_ERRORUnspecified response.
Parameters
[in]bRetCodeReturn Code byte from Card.

§ phalMfc_SamAV2_X_ConvertNak()

phStatus_t phalMfc_SamAV2_X_ConvertNak ( phStatus_t  status)

Convert HAL Nak codes into palMifare NAK codes.

Returns
Status code
Return values
PHPAL_MIFARE_ERR_NAK0NAK 0.
PHPAL_MIFARE_ERR_NAK1NAK 1.
PHPAL_MIFARE_ERR_NAK4NAK 4.
PHPAL_MIFARE_ERR_NAK5NAK 5.
OtherDepending on implementation and underlying component.
Parameters
[in]statusHAL NAK Code.

§ phalMfp_Int_ComputeErrorResponse()

phStatus_t phalMfp_Int_ComputeErrorResponse ( uint16_t  wNumBytesReceived,
uint8_t  bStatus,
uint8_t  bLayer4Comm 
)

Evaluate if the received response is erroneus.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]wNumBytesReceivedNumber of bytes received from the card.
[in]bStatusStatus byte received from the card.
[in]bLayer4Comm0: use ISO14443-3 protocol; 1: use ISO14443-4 protocol.

§ phalMfp_Int_WritePerso()

phStatus_t phalMfp_Int_WritePerso ( void *  pPalMifareDataParams,
uint8_t  bLayer4Comm,
uint16_t  wBlockNr,
uint8_t pValue 
)

Perform a MIFARE Plus Write Perso command.

The Write Perso command can be executed using the ISO14443-3 communication protocol (after layer 3 activation) or using the ISO14443-4 protocol (after layer 4 activation).

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pPalMifareDataParamsPointer to a palMifare component context.
[in]bLayer4Comm0: use ISO14443-3 protocol; 1: use ISO14443-4 protocol.
[in]wBlockNrMIFARE Block number.
[in]pValueValue (16 bytes).

§ phalMfp_Int_CommitPerso()

phStatus_t phalMfp_Int_CommitPerso ( void *  pPalMifareDataParams,
uint8_t  bLayer4Comm 
)

Perform a MIFARE Plus Commit Perso command.

The Commit Perso command can be executed using the ISO14443-3 communication protocol (after layer 3 activation) or using the ISO14443-4 protocol (after layer 4 activation).

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pPalMifareDataParamsPointer to a palMifare component context.
[in]bLayer4Comm0: use ISO14443-3 protocol; 1: use ISO14443-4 protocol.

§ phalMfp_Int_ResetAuth()

phStatus_t phalMfp_Int_ResetAuth ( void *  pPalMifareDataParams)

Perform a MIFARE Plus Reset Authenticate command.

The Reset Authenticate command is executed using the ISO14443-4 communication protocol (after layer 4 activation)

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pPalMifareDataParamsPointer to a palMifare component context.

§ phalMfp_Int_PrepareProximityCheck()

phStatus_t phalMfp_Int_PrepareProximityCheck ( void *  pPalMifareDataParams)

Perform a Prepare Proximity Check command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pPalMifareDataParamsPointer to a palMifare component context.

§ phalMfp_Int_ProximityCheck()

phStatus_t phalMfp_Int_ProximityCheck ( void *  pPalMifareDataParams,
uint8_t  bNumSteps,
uint8_t pRndC,
uint8_t pRndRC 
)

Perform a Proximity Check command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pPalMifareDataParamsPointer to a palMifare component context.
[in]bNumStepsNumber of steps for the PC (1..7).
[in]pRndCRndC[7].
[out]pRndRCRndRC[14].

§ phalMfp_Int_MultiBlockRead()

phStatus_t phalMfp_Int_MultiBlockRead ( void *  pPalMifareDataParams,
uint8_t  bBlockNr,
uint8_t  bNumBlocks,
uint8_t pBlocks 
)

Perform a Multi Block Read command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pPalMifareDataParamsPointer to a palMifare component context.
[in]bBlockNrMIFARE Block number.
[in]bNumBlocksNumber of blocks to read (should not be more than 3).
[out]pBlocksBlock(s); uint8_t[16 * bNumBlocks].

§ phalMfp_Int_MultiBlockWrite()

phStatus_t phalMfp_Int_MultiBlockWrite ( void *  pPalMifareDataParams,
uint8_t  bBlockNr,
uint8_t  bNumBlocks,
uint8_t pBlocks 
)

Perform a Multi Block Write command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pPalMifareDataParamsPointer to a palMifare component context.
[in]bBlockNrMIFARE Block number.
[in]bNumBlocksNumber of blocks to write (should not be more than 3).
[in]pBlocksBlock(s); uint8_t[16 * bNumBlocks].

§ phalMfp_Int_CreateValueBlock()

phStatus_t phalMfp_Int_CreateValueBlock ( uint8_t pValue,
uint8_t  bAddrData,
uint8_t pBlock 
)

Create a Value block for a given value/addr pair.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pValueValue to be converted.
[in]bAddrDatabAddrData containing destination address.
[out]pBlockFormatted Value block.

§ phalMfp_Int_CheckValueBlockFormat()

phStatus_t phalMfp_Int_CheckValueBlockFormat ( uint8_t pBlock)

Check value block format of a given block.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pBlockFormatted Value block.

§ phalMfp_SamAV2_AuthenticateGeneral()

phStatus_t phalMfp_SamAV2_AuthenticateGeneral ( phalMfp_SamAV2_DataParams_t *  pDataParams,
uint8_t  bLayer4Comm,
uint8_t  bFirstAuth,
uint16_t  wBlockNr,
uint16_t  wKeyNumber,
uint16_t  wKeyVersion,
uint8_t  bLenDivInput,
uint8_t pDivInput,
uint8_t  bUseKdfSl2,
uint8_t  bLenPcdCap2,
uint8_t pPcdCap2In,
uint8_t pPcdCap2Out,
uint8_t pPdCap2 
)

Perform a complete MIFARE Plus Authentication for either Security Level.

Refer to the respective Authentication function for description.

See also
phalMfp_AuthenticateSL0
phalMfp_AuthenticateSL1
phalMfp_AuthenticateSL2
phalMfp_AuthenticateSL3
Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]bLayer4Comm0: use ISO14443-3 protocol; 1: use ISO14443-4 protocol;
[in]bFirstAuth0: Following Authentication; 1: First Authentication;
[in]wBlockNrKey Block number.
[in]wKeyNumberKey Storage number.
[in]wKeyVersionKey Storage version.
[in]bLenDivInputLength of diversification input used to diversify the key. If 0, no diversification is performed.
[in]pDivInputDiversification Input used to diversify the key.
[in]bUseKdfSl2Indicates if a Key derivation for SL2 should be performed.
[in]bLenPcdCap2Lengh of the supplied PCDCaps.
[in]pPcdCap2InPointer to PCDCaps (bLenPcdCap2 bytes), ignored if bLenPcdCap2 == 0.
[out]pPcdCap2OutPointer to PCDCaps sent from the card (6 bytes).
[out]pPdCap2Pointer to PCDCaps sent from the card (6 bytes).

§ phalMfp_SamAV2_WriteExt()

phStatus_t phalMfp_SamAV2_WriteExt ( phalMfp_SamAV2_DataParams_t *  pDataParams,
uint8_t  bCmdCode,
uint16_t  wSrcBnr,
uint16_t  wDstBnr,
uint8_t pData,
uint8_t  bDataLength 
)

Perform a Write command in all it's flavours.

Refer to the respective Write function for description.

See also
phalMfp_Write
phalMfp_Increment
phalMfp_Decrement
phalMfp_IncrementTransfer
phalMfp_DecrementTransfer
phalMfp_Transfer
phalMfp_Restore
Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]bCmdCodeMIFARE Plus Command Code.
[in]wSrcBnrSource Block number.
[in]wDstBnrDestination Block number.
[in]pDataPayload data.
[in]bDataLengthLength of payload data.

§ phalMfp_SamAV2_X_WriteExt()

phStatus_t phalMfp_SamAV2_X_WriteExt ( phalMfp_SamAV2_X_DataParams_t *  pDataParams,
uint8_t  bCmdCode,
uint16_t  wSrcBnr,
uint16_t  wDstBnr,
uint8_t pData,
uint8_t  bDataLength 
)

Perform a Write command in all it's flavours.

Refer to the respective Write function for description.

See also
phalMfp_Write
phalMfp_Increment
phalMfp_Decrement
phalMfp_IncrementTransfer
phalMfp_DecrementTransfer
phalMfp_Transfer
phalMfp_Restore
Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]bCmdCodeMIFARE Plus Command Code.
[in]wSrcBnrSource Block number.
[in]wDstBnrDestination Block number.
[in]pDataPayload data.
[in]bDataLengthLength of payload data.

§ phalMfp_SamAV2_X_ConvertNak()

phStatus_t phalMfp_SamAV2_X_ConvertNak ( phStatus_t  status)

Convert HAL Nak codes into palMifare NAK codes.

Returns
Status code
Return values
PHPAL_MIFARE_ERR_NAK0NAK 0.
PHPAL_MIFARE_ERR_NAK1NAK 1.
PHPAL_MIFARE_ERR_NAK4NAK 4.
PHPAL_MIFARE_ERR_NAK5NAK 5.
OtherDepending on implementation and underlying component.
Parameters
[in]statusHAL NAK Code.

§ phalMfp_Sw_AuthenticateGeneral()

phStatus_t phalMfp_Sw_AuthenticateGeneral ( phalMfp_Sw_DataParams_t *  pDataParams,
uint8_t  bLayer4Comm,
uint8_t  bFirstAuth,
uint16_t  wBlockNr,
uint16_t  wKeyNumber,
uint16_t  wKeyVersion,
uint8_t  bLenDivInput,
uint8_t pDivInput,
uint8_t  bUseKdfSl2,
uint8_t  bLenPcdCap2,
uint8_t pPcdCap2In,
uint8_t pPcdCap2Out,
uint8_t pPdCap2 
)

Perform a complete MIFARE Plus Authentication for either Security Level.

Refer to the respective Authentication function for description.

See also
phalMfp_AuthenticateSL0
phalMfp_AuthenticateSL1
phalMfp_AuthenticateSL2
phalMfp_AuthenticateSL3
Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]bLayer4Comm0: use ISO14443-3 protocol; 1: use ISO14443-4 protocol;
[in]bFirstAuth0: Following Authentication; 1: First Authentication;
[in]wBlockNrKey Block number.
[in]wKeyNumberKey Storage number.
[in]wKeyVersionKey Storage version.
[in]bLenDivInputLength of diversification input used to diversify the key. If 0, no diversification is performed.
[in]pDivInputDiversification Input used to diversify the key.
[in]bUseKdfSl2Indicates if a Key derivation for SL2 should be performed.
[in]bLenPcdCap2Lengh of the supplied PCDCaps.
[in]pPcdCap2InPointer to PCDCaps (bLenPcdCap2 bytes), ignored if bLenPcdCap2 == 0.
[in]pPcdCap2OutPointer to PCDCaps sent from the card (6 bytes).
[out]pPdCap2Pointer to PDCaps sent from the card (6 bytes).

§ phalMfp_Sw_WriteExt()

phStatus_t phalMfp_Sw_WriteExt ( phalMfp_Sw_DataParams_t *  pDataParams,
uint8_t  bCmdCode,
uint16_t  wSrcBnr,
uint16_t  wDstBnr,
uint8_t pData,
uint16_t  wDataLength,
uint8_t  bEncrypted 
)

Perform a Write command in all it's flavours.

Refer to the respective Write function for description.

See also
phalMfp_Write
phalMfp_Increment
phalMfp_Decrement
phalMfp_IncrementTransfer
phalMfp_DecrementTransfer
phalMfp_Transfer
phalMfp_Restore
Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]bCmdCodeMIFARE Plus Command Code.
[in]wSrcBnrSource Block number.
[in]wDstBnrDestination Block number.
[in]pDataPayload data.
[in]wDataLengthLength of payload data.
[in]bEncryptedindicates whether the data should be encrypted or not.

§ phalMfp_Sw_Int_ComputeIv()

phStatus_t phalMfp_Sw_Int_ComputeIv ( uint8_t  bIsResponse,
uint8_t pTi,
uint16_t  wRCtr,
uint16_t  wWCtr,
uint8_t pIv 
)

Calculate the Init-Vector for encryption from input data.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]bIsResponseWhether this is a response or command or not.
[in]pTiTransaction Identifier; uint8_t[4].
[in]wRCtrR_CTR (read counter).
[in]wWCtrW_CTR (write counter).
[out]pIvInitvector; uint8_t[16].

§ phalMfp_Sw_Int_KdfSl2()

phStatus_t phalMfp_Sw_Int_KdfSl2 ( phalMfp_Sw_DataParams_t *  pDataParams,
uint8_t pRndA,
uint8_t pRndB 
)

Perform a SL2 Key Derivation Function.

This function derives the MIFARE Sector Key.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]pRndAPointer to RndA Buffer.
[in]pRndBPointer to RndB Buffer.

§ phalMfp_Sw_Int_KdfSl3()

phStatus_t phalMfp_Sw_Int_KdfSl3 ( phalMfp_Sw_DataParams_t *  pDataParams,
uint8_t pRndA,
uint8_t pRndB 
)

Perform a SL3 Key Derivation Function.

This function derives the MIFARE Sector Key.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]pRndAPointer to RndA Buffer.
[in]pRndBPointer to RndB Buffer.

§ phalMfp_Sw_Int_TruncateMac()

void phalMfp_Sw_Int_TruncateMac ( uint8_t pMac,
uint8_t pTruncatedMac 
)

Perform MIFARE Plus specific MAC truncation.

Parameters
[in]pMacMAC; uint8_t[16].
[out]pTruncatedMacTruncated MAC; uint8_t[8].

§ phbalReg_SerialWin_SetMode()

phStatus_t phbalReg_SerialWin_SetMode ( void *  phPort,
uint32_t  dwBitRate,
uint8_t  bStopBits 
)

Change host bit rate.

Changes host bit rate, stop bits and applies default settings (parity and the like).

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]phPorthandle to an open communication port
[in]dwBitRatebit rate value in windows-style (like '115200', in decimal)
[in]bStopBitsnumber of stop bits

§ phbalReg_SerialWin_SetTimeout()

phStatus_t phbalReg_SerialWin_SetTimeout ( void *  phPort,
uint32_t  dwTimeout 
)

Change reception timeout.

Applies new serial reception timeout

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]phPorthandle to an open communication port
[in]dwTimeouttimeout value in windows-style (like '500', in milliseconds)

§ phKeyStore_Sw_GetKeyValuePtrPos()

phStatus_t phKeyStore_Sw_GetKeyValuePtrPos ( phKeyStore_Sw_DataParams_t pDataParams,
uint16_t  wKeyNumber,
uint16_t  wPos,
phKeyStore_Sw_KeyVersionPair_t **  pKeyVersion 
)

Get the pointer to a KeyValue Pair given a Key number and a Key position.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]wKeyNumberdesired key number.
[in]wPosdesired key position.
[out]pKeyVersionPointer to the KeyVerison Pair.

§ phKeyStore_Sw_GetKeyValuePtrVersion()

phStatus_t phKeyStore_Sw_GetKeyValuePtrVersion ( phKeyStore_Sw_DataParams_t pDataParams,
uint16_t  wKeyNumber,
uint16_t  wKeyVersion,
phKeyStore_Sw_KeyVersionPair_t **  pKeyVersion 
)

Get the pointer to a KeyValue Pair given a Key number and a KeyVersion.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]wKeyNumberdesired key number.
[in]wKeyVersiondesired key version.
[out]pKeyVersionPointer to the KeyVerison Pair.

§ phKeyStore_Sw_CheckUpdateKUC()

phStatus_t phKeyStore_Sw_CheckUpdateKUC ( phKeyStore_Sw_DataParams_t pDataParams,
uint16_t  wKeyUsageCtrNumber 
)

Check value of a counter and increment it accordingly.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]wKeyUsageCtrNumberKUC Number.

§ phLog_GetRegisteredEntry()

phLog_RegisterEntry_t* phLog_GetRegisteredEntry ( void *  pDataParams)

Retreive phLog_RegisterEntry_t corresponding to given DataParams pointer.

Parameters
[in]pDataParamsThe DataParams of the calling function.

§ phLog_AddParam_Raw()

void phLog_AddParam_Raw ( void *  pDataParams,
uint8_t  bLogType,
const char *  pName,
const void *  pParam,
uint16_t  wLength,
uint8_t  bDataType 
)

Add a new log entry containing raw data.

See also
phLog_LogEnty_t
Parameters
[in]pDataParamsThe DataParams of the calling function.
[in]bLogTypeType of Entry (one of the PH_LOG_LOGTYPE_* values).
[in]pNameThe Null-terminated name of the parameter.
[in]pParamPointer to the memory where the parameter resides.
[in]wLengthThe length in bytes to the supplied buffer.
[in]bDataTypeIndicates the value type (either #PH_LOG_DATATYPE_BUFFER or #PH_LOG_DATATYPE_VALUE).

§ phpalI14443p3a_Sw_RequestAEx()

phStatus_t phpalI14443p3a_Sw_RequestAEx ( phpalI14443p3a_Sw_DataParams_t pDataParams,
uint8_t  bReqCode,
uint8_t pAtqa 
)

Perform a ISO14443-3A Request or Wakeup command.

Request Codes:
REQUEST: bReqCode = 0x52
WAKEUP: bReqCode = 0x26

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_PROTOCOL_ERRORInvalid response received.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]bReqCoderequest code according to ISO14443-3A.
[out]pAtqaAtqA; uint8_t[2].

§ phpalI14443p3b_Sw_RequestBEx()

phStatus_t phpalI14443p3b_Sw_RequestBEx ( phpalI14443p3b_Sw_DataParams_t pDataParams,
uint8_t  bIsWakeUp,
uint8_t  bNumSlots,
uint8_t  bAfi,
uint8_t  bExtAtqb,
uint8_t pAtqb,
uint8_t pAtqbLen 
)

Perform a ISO14443-3B Request/Wakeup command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_PROTOCOL_ERRORInvalid response received.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParamsPointer to this layers parameter structure.
[in]bIsWakeUpPerforms ReqB if bIsWakeUp=0 and WupB if bIsWakeUp=1.
[in]bNumSlotsNumber of slots.
[in]bAfiAFI; Application Family Indentifier.
[in]bExtAtqbEnable Extended AtqB.
[out]pAtqbAtqB; uint8_t[13].
[out]pAtqbLenLength of received ATQB (12/13 bytes)

§ phpalI14443p3b_Sw_CheckATQBEx()

phStatus_t phpalI14443p3b_Sw_CheckATQBEx ( phpalI14443p3b_Sw_DataParams_t pDataParams,
uint8_t pResp,
uint16_t  wRespLength,
uint8_t pAtqb,
uint8_t pAtqbLen 
)

Check the received answer to Request/Wakeup/SlotMarker command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_PROTOCOL_ERRORInvalid response received.
OtherDepending on implementation and underlaying component.

§ phpalI14443p3b_Sw_SetReaderBaudRateEx()

phStatus_t phpalI14443p3b_Sw_SetReaderBaudRateEx ( phpalI14443p3b_Sw_DataParams_t pDataParams)

Set the baud rate on the reader device.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_PROTOCOL_ERRORInvalid response received.
OtherDepending on implementation and underlaying component.

§ phpalI14443p3b_Sw_DecideBaudRateEx()

phStatus_t phpalI14443p3b_Sw_DecideBaudRateEx ( uint8_t  bBitRateCapability,
uint8_t pbDri,
uint8_t pbDsi 
)

Decide which baud rate to use depending on the VICCs capabilities and the callers request.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_PROTOCOL_ERRORInvalid response received.
OtherDepending on implementation and underlaying component.

§ phpalI14443p4_Sw_BuildIBlock()

phStatus_t phpalI14443p4_Sw_BuildIBlock ( uint8_t  bCidEnabled,
uint8_t  bCid,
uint8_t  bNadEnabled,
uint8_t  bNad,
uint8_t  bPcbBlockNum,
uint8_t  bChaining,
uint8_t pTxBuffer,
uint16_t pTxLength 
)

Build I-Block frame header.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]bCidEnabledSet to != 0 to enable CID byte
[in]bCidCID byte
[in]bNadEnabledSet to != 0 to enable NAD byte
[in]bNadNAD byte
[in]bPcbBlockNumPCB block number bit
[in]bChainingSet to != 0 if chaining bit should be set
[out]pTxBuffertransmit buffer
[out]pTxLengthnumber of bytes to send

§ phpalI14443p4_Sw_BuildRBlock()

phStatus_t phpalI14443p4_Sw_BuildRBlock ( uint8_t  bCidEnabled,
uint8_t  bCid,
uint8_t  bPcbBlockNum,
uint8_t  bIsAck,
uint8_t pTxBuffer,
uint16_t pTxLength 
)

Build R(ACK) / R(NAK) frames.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]bCidEnabledSet to != 0 to enable CID byte
[in]bCidCID byte
[in]bPcbBlockNumPCB block number bit
[in]bIsAckSet to != 0 if an ACK should be generated
[out]pTxBuffertransmit buffer
[out]pTxLengthnumber of bytes to send

§ phpalI14443p4_Sw_BuildSBlock()

phStatus_t phpalI14443p4_Sw_BuildSBlock ( uint8_t  bCidEnabled,
uint8_t  bCid,
uint8_t  bIsWtx,
uint8_t  bWtxm,
uint8_t pTxBuffer,
uint16_t pTxLength 
)

Build S-Block frames.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]bCidEnabledSet to != 0 to enable CID byte
[in]bCidCID byte
[in]bIsWtxSet to != 0 if a WTX frame should be generated
[in]bWtxmWTXM bits, used if /ref bIsWtx is set
[out]pTxBuffertransmit buffer
[out]pTxLengthnumber of bytes to send

§ phpalI14443p4_Sw_IsValidIBlock()

phStatus_t phpalI14443p4_Sw_IsValidIBlock ( uint8_t  bCheckCid,
uint8_t  bCid,
uint8_t  bCheckNad,
uint8_t  bNad,
uint8_t pRxBuffer,
uint16_t  wRxLength 
)

Check if received I-Block is valid.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_PROTOCOL_ERRORBlock invalid.
Parameters
[in]bCheckCidSet to != 0 to enable CID check
[in]bCidCurrent CID for comparison
[in]bCheckNadSet to != 0 to enable NAD check
[in]bNadCurrent NAD for comparison
[in]pRxBufferReceived data
[in]wRxLengthNumber of received data bytes

§ phpalI14443p4_Sw_IsValidRBlock()

phStatus_t phpalI14443p4_Sw_IsValidRBlock ( uint8_t  bCheckCid,
uint8_t  bCid,
uint8_t pRxBuffer,
uint16_t  wRxLength 
)

Check if received R-Block is valid.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_PROTOCOL_ERRORBlock invalid.
Parameters
[in]bCheckCidSet to != 0 to enable CID check
[in]bCidCurrent CID for comparison
[in]pRxBufferReceived data
[in]wRxLengthNumber of received data bytes

§ phpalI14443p4_Sw_IsValidSBlock()

phStatus_t phpalI14443p4_Sw_IsValidSBlock ( uint8_t  bCheckCid,
uint8_t  bCid,
uint8_t pRxBuffer,
uint16_t  wRxLength 
)

Check if received S-Block is valid.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_PROTOCOL_ERRORBlock invalid.
Parameters
[in]bCheckCidSet to != 0 to enable CID check
[in]bCidCurrent CID for comparison
[in]pRxBufferReceived data
[in]wRxLengthNumber of received data bytes

§ phpalI14443p4_Sw_IsoHandling()

phStatus_t phpalI14443p4_Sw_IsoHandling ( phpalI14443p4_Sw_DataParams_t pDataParams,
uint16_t  wOption,
uint8_t  bRetryCount,
uint8_t pTxBuffer,
uint16_t  wTxLength,
uint8_t **  ppRxBuffer,
uint16_t pRxLength 
)

Perform actual exchanging and take care about error handling etc.

Checks response and performs state transition and complete error & WTX handling if neecessary.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]wOptionoption parameter.
[in]bRetryCountnumber of already performed retries.
[in]pTxBufferdata to transmit
[in]wTxLengthlength of input data
[out]ppRxBufferPointer to received data
[in]pRxLengthReceived data bytes

§ phpalI18092mPI_Sw_WriteFrameHeader()

phStatus_t phpalI18092mPI_Sw_WriteFrameHeader ( phpalI18092mPI_Sw_DataParams_t pDataParams,
uint16_t  wOption,
uint8_t  bCommandCode,
uint8_t  bDataLength 
)

Write header of transport protocol frame to internal buffer of HAL.

Internal buffer is cleared first and protocol frame header is written without setting length field since frame size is not known at this point.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]wOptionOption parameter.
[in]bCommandCodeCode of the request command to send.
[in]bDataLengthLength of data field.

§ phpalI18092mPI_Sw_WritePduHeader()

phStatus_t phpalI18092mPI_Sw_WritePduHeader ( phpalI18092mPI_Sw_DataParams_t pDataParams,
uint8_t  bPduMask,
uint8_t  bOption,
uint8_t  bDataLength 
)

Write PDU header to internal buffer of HAL.

The following values for bPduMask are possible:

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]bPduMaskBit mask of the desired PDU type.
[in]bOptionOption bit; either PH_ON or PH_OFF.
[in]bDataLengthLength of data field.

§ phpalI18092mPI_Sw_UpdatePduHeader()

phStatus_t phpalI18092mPI_Sw_UpdatePduHeader ( phpalI18092mPI_Sw_DataParams_t pDataParams,
uint8_t  bDataLength 
)

Update the length field within protocol frame header.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]bDataLengthLength of data field.

§ phpalI18092mPI_Sw_GetPduHeaderLength()

phStatus_t phpalI18092mPI_Sw_GetPduHeaderLength ( phpalI18092mPI_Sw_DataParams_t pDataParams,
uint8_t pProtLength 
)

Retrieve the length of protocol frame header.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[out]pProtLengthComplete protocol length starting at the command byte.

§ phpalI18092mPI_Sw_ValidateAndNormalizeResponseFrame()

phStatus_t phpalI18092mPI_Sw_ValidateAndNormalizeResponseFrame ( phpalI18092mPI_Sw_DataParams_t pDataParams,
uint8_t pFrame,
uint16_t  wFrameLength,
uint8_t  bExpectedResponseCode,
uint8_t **  ppValidatedFrame,
uint16_t pValidatedFrameLength,
uint8_t **  ppPayload,
uint16_t pPayloadLength 
)

Basic check if the received response is a valid frame.

Frame is also normalized, i.e. start byte in case of 106kbps data rate is removed.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful, frame seems to be a valid response frame.
PH_ERR_PROTOCOL_ERRORNot a valid response frame.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]pFramePointer to the received data buffer.
[in]wFrameLengthLength of the received frame.
[in]bExpectedResponseCodeThe expected response command code the frame should contain.
[out]ppValidatedFramePointer to validated and normalized frame.
[out]pValidatedFrameLengthLength of validated and normalized frame.
[out]ppPayloadPointer to begin of data payload (header skipped).
[out]pPayloadLengthLength of data payload.

§ phpalI18092mPI_Sw_ConvertDatarate()

phStatus_t phpalI18092mPI_Sw_ConvertDatarate ( uint16_t  wHalDatarate,
uint8_t pI18092Datarate 
)

Convert data rate read out from HAL to ISO18092 compatible data rate value (PHPAL_I18092MPI_DATARATE_*).

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INTERNAL_ERRORData rate can't be converted.
Parameters
[in]wHalDatarateDatarate read out from HAL.
[out]pI18092DataratePointer to a converted datarate; uint8_t[1]

§ phpalI18092mPI_Sw_TransceivePdu()

phStatus_t phpalI18092mPI_Sw_TransceivePdu ( phpalI18092mPI_Sw_DataParams_t pDataParams,
uint16_t  wOption,
uint8_t pTxBuffer,
uint16_t  wTxLength,
uint8_t **  ppRawResponse,
uint16_t pRawResponseLength,
uint8_t **  ppNormalizedResponse,
uint16_t pNormalizedResponseLength,
uint8_t **  ppPayload,
uint16_t pPayloadLength 
)

Transmit PDU to target and receive response.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]wOptionOption parameter.
[in]pTxBufferData to transmit.
[in]wTxLengthLength of data to transmit.
[out]ppRawResponsePointer to raw DEP frame.
[out]pRawResponseLengthLength of raw DEP frame.
[out]ppNormalizedResponsePointer to validated and normalized frame.
[out]pNormalizedResponseLengthLength of validated and normalized frame.
[out]ppPayloadPointer to begin of data payload (header skipped).
[out]pPayloadLengthLength of data payload.

§ phpalI18092mPI_Sw_ValidateReceivedPdu()

phStatus_t phpalI18092mPI_Sw_ValidateReceivedPdu ( phpalI18092mPI_Sw_DataParams_t pDataParams,
phStatus_t  statusRx,
uint8_t **  pRawResponse,
uint16_t wRawResponseLength,
uint8_t **  ppNormalizedResponse,
uint16_t pNormalizedResponseLength,
uint8_t **  ppPayload,
uint16_t pPayloadLength 
)

Validate the status.

If status is success then validate the received PDU from target.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]statusRxStatus returned by HAL Receive.
[out]pRawResponsePointer to raw DEP frame.
[out]wRawResponseLengthLength of raw DEP frame.
[out]ppNormalizedResponsePointer to validated and normalized frame.
[out]pNormalizedResponseLengthLength of validated and normalized frame.
[out]ppPayloadPointer to begin of data payload (header skipped).
[out]pPayloadLengthLength of data payload.

§ phpalMifare_SamAV2_X_ConvertNak()

phStatus_t phpalMifare_SamAV2_X_ConvertNak ( phStatus_t  status)

Convert HAL Nak codes into palMifare NAK codes.

Returns
Status code
Return values
PHPAL_MIFARE_ERR_NAK0NAK 0.
PHPAL_MIFARE_ERR_NAK1NAK 1.
PHPAL_MIFARE_ERR_NAK4NAK 4.
PHPAL_MIFARE_ERR_NAK5NAK 5.
OtherDepending on implementation and underlying component.
Parameters
[in]statusHAL NAK Code.

§ phpalSli15693_Sw_InventoryEx()

phStatus_t phpalSli15693_Sw_InventoryEx ( phpalSli15693_Sw_DataParams_t pDataParams,
uint8_t  bOption,
uint8_t  bFlags,
uint8_t  bAfi,
uint8_t pMask,
uint8_t  bMaskBitLength,
uint8_t  bBlockNo,
uint16_t  wNoOfBlocks,
uint8_t pUid,
uint8_t pUidLength,
uint8_t pData,
uint16_t pLength 
)

Perform all kinds of Inventory commands.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_PROTOCOL_ERRORInvalid response received.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParamsPointer to this layers parameter structure.
[in]bOptiondefines which way of (Fast)Inventory(Page)Read is done.
bOption bits are defined as follows:
  • b1 = 0 -> InventoryRead
  • b1 = 1 -> InventoryPageRead
  • b2 = 0 -> normal
  • b2 = 1 -> FAST
[in]bFlagsRequest flags byte.
[in]bAfiApplication Family Identifier.
[in]pMaskUID mask, holding known UID bits.
[in]bMaskBitLengthNumber of UID bits within pMask.
[in]bBlockNoBlock number of first block to read.
[in]wNoOfBlocksNumber of blocks to read
[out]pUidReceived Uid
[out]pUidLengthNumber of received UID bytes.
[out]pDataReceived data.
[out]pLengthNumber of received data bytes.

§ phpalSli15693_Sw_InventoryExt()

phStatus_t phpalSli15693_Sw_InventoryExt ( phpalSli15693_Sw_DataParams_t pDataParams,
uint8_t  bOption,
uint8_t  bFlags,
uint8_t  bAfi,
uint8_t  bExtended,
uint8_t  bExtendedOptions,
uint8_t pMask,
uint8_t  bMaskBitLength,
uint8_t  bBlockNo,
uint16_t  wNoOfBlocks,
uint8_t pUid,
uint8_t pUidLength,
uint8_t pData,
uint16_t pLength 
)

Perform Inventory Read Extended mode.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_PROTOCOL_ERRORInvalid response received.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParamsPointer to this layers parameter structure.
[in]bOptiondefines which way of (Fast)Inventory(Page)Read is done.
bOption bits are defined as follows:
  • b1 = 0 -> InventoryRead
  • b1 = 1 -> InventoryPageRead
  • b2 = 0 -> normal
  • b2 = 1 -> FAST
[in]bFlagsRequest flags byte.
[in]bAfiApplication Family Identifier.
[in]bExtendedExtended mode
[in]bExtendedOptionsFeatures of the extended mode
[in]pMaskUID mask, holding known UID bits.
[in]bMaskBitLengthNumber of UID bits within pMask.
[in]bBlockNoBlock number of first block to read.
[in]wNoOfBlocksNumber of blocks to read
[out]pUidReceived Uid
[out]pUidLengthNumber of received UID bytes.
[out]pDataReceived data.
[out]pLengthNumber of received data bytes.