NXP Reader Library  v17.1.0.2535
(Private definitions)

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

Collaboration diagram for (Private definitions):

Macros

#define PHAL_MFDFEVX_WRAP_HDR_LEN   0x05U
 Wrapped APDU header length.
 
#define PHAL_MFDFEVX_WRAPPEDAPDU_CLA   0x90U
 Wrapped APDU default class.
 
#define PHAL_MFDFEVX_WRAPPEDAPDU_P1   0x00U
 Wrapped APDU default P1.
 
#define PHAL_MFDFEVX_WRAPPEDAPDU_P2   0x00U
 Wrapped APDU default P2.
 
#define PHAL_MFDFEVX_WRAPPEDAPDU_LE   0x00U
 Wrapped APDU default LE.
 
#define PHAL_MFDFEVX_TRUNCATED_MAC_SIZE   8
 Size of the truncated MAC.
 
#define PHAL_MFDFEVX_KEYSETVERSIONS   0x40U
 6th bit KeyNo used to retrieve all KeySet versions.
 
#define PHAL_MFDFEVX_ISO_CHAINING_MODE   0x04
 Option to enable ISO chaining.
 
#define PHAL_MFDFEVX_DEFAULT_MODE   0x00
 Native Chaining.
 
#define PHAL_MFDFEVX_PC_RND_LEN   7
 Size of the Proximity Check Random numbers.
 
#define PHAL_MFDFEVX_SIG_LENGTH   0x38
 NXP Originality Signature length.
 
#define PHAL_MFDFEVX_DEFAULT_UID_LENGTH   0x07
 By default EVx card is configures as 7 byte UID.
 
#define PHAL_MFDFEVX_10B_UID_LENGTH   0x0C
 EVx can also be configured as 10 byte UID.
 
#define PHAL_MFDFEVX_4B_UID_LENGTH   0x06
 EVx can also be configured as 4 byte UID.
 
#define PHAL_MFDFEVX_DEF_VERSION_LENGTH   0x1C
 Version String is of 28 bytes by default(If its 7 Byte UID)
 
#define PHAL_MFDFEVX_10B_VERSION_LENGTH   0x21
 Version String is of 30 bytes If its 10B Byte UID.
 
#define PHAL_MFDFEVX_4B_VERSION_LENGTH   0x1B
 Version String is of 27 bytes If its 4B Byte UID.
 
#define PHAL_MFDFEVX_ISO_CHAINING_MODE_MAPPED   (PHAL_MFDFEVX_ISO_CHAINING_MODE)
 Option to enable ISO chaining mapped for internal use.
 
#define PHAL_MFDFEVX_ISO_7816_NO_LC_LE   0x00
 Check if LC=0 and Le=0.
 
#define PHAL_MFDFEVX_ISO_7816_LC_SHORT_APDU   0x01
 Indicates LC=1 byte.
 
#define PHAL_MFDFEVX_ISO_7816_LC_EXT_APDU_3B   0x03
 Indicates LC=3 bytes.
 
#define PHAL_MFDFEVX_ISO_7816_LE_SHORT_APDU   PHAL_MFDFEVX_ISO_7816_LC_SHORT_APDU
 Indicates Le=1 byte.
 
#define PHAL_MFDFEVX_ISO_7816_LE_EXT_APDU_2B   0x02
 Indicates Le=2 bytes.
 
#define PHAL_MFDFEVX_ISO_7816_LE_EXT_APDU_3B   PHAL_MFDFEVX_ISO_7816_LC_EXT_APDU_3B
 Indicates Le=3 bytes.
 
#define PHAL_MFP_TRUNCATED_MAC_SIZE   8
 Size of the truncated MAC.
 
#define PHAL_MFP_MIFARE_VALUE_BLOCK_SIZE   4
 Size of a MIFARE value block.
 
#define PHAL_MFP_MIFARE_BLOCK_SIZE   16
 Size of the MIFARE blocks.
 
#define PHAL_MFP_PC_RND_LEN   7
 Size of the Proximity Check Random numbers.
 
#define PHAL_MFPRIMENTAG_TRUNCATED_MAC_SIZE   8
 Size of the truncated MAC.
 
#define PHAL_MFPRIMENTAG_KEYSETVERSIONS   0x40U
 6th bit KeyNo used to retrieve all keyset versions.
 
#define PHAL_MFPRIMENTAG_ISO_CHAINING_MODE   0x04
 Option to enable ISO chaining.
 
#define PHAL_MFPRIMENTAG_DEFAULT_MODE   0x00
 Native Chaining.
 
#define PHAL_MFPRIMENTAG_SIG_LENGTH   0x38
 NXP Originality Signature length.
 
#define PHAL_MFPRIMENTAG_DEFAULT_UID_LENGTH   0x07
 By default NTAG card is configures as 7 byte UID.
 
#define PHAL_MFPRIMENTAG_10B_UID_LENGTH   0x09
 EV2 can also be configured as 10 byte UID.
 
#define PHAL_MFPRIMENTAG_4B_UID_LENGTH   0x06
 EV2 can also be configured as 4 byte UID.
 
#define PHAL_MFPRIMENTAG_SDM_FILE_CTR_LENGTH   0x05
 SDMReadCounter(3B) + reserved(2B)
 
#define PHAL_MFPRIMENTAG_DEF_VERSION_LENGTH   0x1C
 Version String is of 28 bytes by default(If its 7 Byte UID)
 
#define PHAL_MFPRIMENTAG_10B_VERSION_LENGTH   0x1E
 Version String is of 30 bytes If its 10B Byte UID.
 
#define PHAL_MFPRIMENTAG_4B_VERSION_LENGTH   0x1B
 Version String is of 27 bytes If its 4B Byte UID.
 
#define PHAL_MFPRIMENTAG_ISO_CHAINING_MODE_MAPPED   (PHAL_MFPRIMENTAG_ISO_CHAINING_MODE << 2)
 Option to enable ISO chaining mapped for internal use.
 
#define PHAL_MFPRIMENTAG_ISO_7816_NO_LC_LE   0x00
 Check if Lc=0 and Le=0.
 
#define PHAL_MFPRIMENTAG_ISO_7816_LC_SHORT_APDU   0x01
 Indicates Lc=1 byte.
 
#define PHAL_MFPRIMENTAG_ISO_7816_LC_EXT_APDU_3B   0x03
 Indicates Lc=3 bytes.
 
#define PHAL_MFPRIMENTAG_ISO_7816_LE_SHORT_APDU   PHAL_MFPRIMENTAG_ISO_7816_LC_SHORT_APDU
 Indicates Le=1 byte.
 
#define PHAL_MFPRIMENTAG_ISO_7816_LE_EXT_APDU_2B   0x02
 Indicates Le=2 bytes.
 
#define PHAL_MFPRIMENTAG_ISO_7816_LE_EXT_APDU_3B   PHAL_MFPRIMENTAG_ISO_7816_LC_EXT_APDU_3B
 Indicates Le=3 bytes.
 
#define PHBAL_REG_SERIALWIN_RX_TIMEOUT_VAL   100
 Default timeout value to guarantee no deadlocks (ReadBus & WriteBus)
 
#define PHHAL_HW_SAMAV2_TIMER_FREQ   13.56f
 RC internal timer frequency.
 
#define PHHAL_HW_SAMAV2_ETU_106   9.44f
 Duration of one ETU at 106 kBit/s in [us].
 
#define PHHAL_HW_SAMAV2_RC523_TIMER_MAX_VALUE_US   6596996
 (RC523) Maximum timer value in microseconds.
 
#define PHHAL_HW_SAMAV2_RC523_TIMER_SHIFT   4.8f
 (RC523) Shift of the internal RC timer in ETUs.
 
#define PHHAL_HW_SAMAV2_RC663_TIMER_RELOAD_MAX   0xFFFFU
 (RC663) Maximum reload value of internal timers.
 
#define PHHAL_HW_SAMAV2_RC663_I14443_ADD_DELAY_US   15
 (RC663) Additional digital timeout delay for ISO14443.
 
#define PHHAL_HW_SAMAV2_RC663_DIGI_DELAY_TXWAIT_DBFREQ   8U
 (RC663) Chip digital delay in ETUs for TxWait.
 
#define PHHAL_HW_SAMAV2_AUTHMODE_KEYA   0x60
 MFC KeyA Authentication Mode.
 
#define PHHAL_HW_SAMAV2_AUTHMODE_KEYB   0x61
 MFC KeyA Authentication Mode.
 
#define PHHAL_HW_SAMAV3_RC523_TIMER_FREQ   13.56f
 RC internal timer frequency.
 
#define PHHAL_HW_SAMAV3_RC523_ETU_106   9.44f
 Duration of one ETU at 106 kBit/s in [us].
 
#define PHHAL_HW_SAMAV3_RC523_TIMER_MAX_VALUE_US   6596996
 (RC523) Maximum timer value in microseconds.
 
#define PHHAL_HW_SAMAV3_RC523_TIMER_SHIFT   4.8f
 (RC523) Shift of the internal RC timer in ETUs.
 
#define PHHAL_HW_SAMAV3_RC663_TIMER_FREQ   13.56f
 RC internal timer frequency.
 
#define PHHAL_HW_SAMAV3_RC663_ETU_106   9.44f
 Duration of one ETU at 106 kBit/s in [us].
 
#define PHHAL_HW_SAMAV3_RC663_TIMER_RELOAD_MAX   0xFFFFU
 (RC663) Maximum reload value of internal timers.
 
#define PHHAL_HW_SAMAV3_RC663_I14443_ADD_DELAY_US   15
 (RC663) Additional digital timeout delay for ISO14443.
 
#define PHHAL_HW_SAMAV3_RC663_DIGI_DELAY_TXWAIT_DBFREQ   8U
 (RC663) Chip digital delay in ETUs for TxWait.
 
#define PHHAL_HW_SAMAV3_RC663_RXTX_I14443A_106   0x00U
 ISO14443A Operating mode at 106kbit/s.
 
#define PHHAL_HW_SAMAV3_RC663_RXTX_I14443A_212   0x01U
 ISO14443A Operating mode at 212kbit/s.
 
#define PHHAL_HW_SAMAV3_RC663_RXTX_I14443A_424   0x02U
 ISO14443A Operating mode at 414kbit/s.
 
#define PHHAL_HW_SAMAV3_RC663_RXTX_I14443A_848   0x03U
 ISO14443A Operating mode at 848kbit/s.
 
#define PHPAL_EPCUID_SW_CMD_BEGINROUND   0x30U
 BEGIN ROUND command code.
 
#define PHPAL_EPCUID_SW_CMD_WRITE   0x01U
 WRITE command code.
 
#define PHPAL_EPCUID_SW_CMD_DESTROY   0x02U
 DESTROY command code.
 
#define PHPAL_EPCUID_SW_UID_LENGTH   12U
 The UID length in bytes.
 
#define PHPAL_EPCUID_SW_T0_MIN_US   111U
 t0(min) in microseconds.
 
#define PHPAL_EPCUID_SW_T1_MIN_US   302U
 t1(min) in microseconds.
 
#define PHPAL_EPCUID_SW_T2_MIN_US   302U
 t2(min) in microseconds.
 
#define PHPAL_EPCUID_SW_T3_MIN_US   378U
 t3(min) in microseconds.
 
#define PHPAL_EPCUID_SW_T4_MIN_US   300U
 t4(min) in microseconds.
 
#define PHPAL_EPCUID_SW_T5_MIN_US   149U
 t5(min) in microseconds.
 
#define PHPAL_EPCUID_SW_EXT_TIME_US   60U
 Time extension in microseconds for all timeouts.
 
#define PHPAL_EPCUID_SW_BEGINROUND_DEAFTIME_ETU   11U
 Deaf time for BEGIN ROUND in ETUs. More...
 
#define PHPAL_EPCUID_SW_TIMEOUT_ANTICOLL_US   PHPAL_EPCUID_SW_T3_MIN_US + PHPAL_EPCUID_SW_EXT_TIME_US
 Timeout for anticollision commands in microseconds.
 
#define PHPAL_EPCUID_SW_TIMEOUT_DEFAULT_US   6400U
 Timeout for all other commands in microseconds.
 
#define PHPAL_EPCUID_SW_DEAFTIME_DEFAULT_ETU   6U
 Deaf time for all other commands in ETUs.
 
#define PHPAL_I14443P3A_REQUEST_CMD   0x26U
 ReqA Command code.
 
#define PHPAL_I14443P3A_WAKEUP_CMD   0x52U
 WupA Command code.
 
#define PHPAL_I14443P3A_REQUEST_S_CMD   0x7AU
 ReqS Command code.
 
#define PHPAL_I14443P3A_WAKEUP_S_CMD   0x7DU
 WupS 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).
 
#define PHPAL_I14443P3B_SW_ATTRIB_TIME_US   4800
 Answer to ATTRIB FWT (ISO14443-3 7.9.4.3).
 
#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   60
 Time extension in microseconds for all commands. More...
 
#define PHPAL_I14443P4_ANDROID_COMMAND_GET_SYS_INFO   0xED
 Command Header.
 
#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   0x01U
 ISO 14443-4 S-Block RFU mask.
 
#define PHPAL_I14443P4_SW_S_BLOCK_RFU_BITS   0x00U
 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_S_TYPE_MASK   0x32U
 Bit mask within PCB for S block to get type.
 
#define PHPAL_I14443P4_SW_PCB_PARAM   0x30U
 Bits within PCB which signal a Param command.
 
#define PHPAL_I14443P4_SW_PCB_DESELECT   0x02U
 Bits within PCB which signal a DESELECT command.
 
#define PHPAL_I14443P4_SW_PCB_WTX   0x32U
 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_MAX_US   4949000
 FTW max in microseconds.
 
#define PHPAL_I14443P4_SW_FWT_DESELECT_US   4833
 S(DESELECT) FTW in microseconds.
 
#define PHPAL_I14443P4_SW_FWT_SPARAM_US   4833
 S(PARAM) 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_SPARAM_FRAME_STANDARD   0x01
 S(Param) Frame code for standard frame.
 
#define PHPAL_I14443P4_SPARAM_FRAME_WEC   0x02
 S(Param) Frame code for standard frame with error correction.
 
#define PHPAL_I14443P4_SPARAM_FRAMEOPTION_START_STOP_BIT   0x01
 S(Param) Frameoption bit for Start/Stop bit suppression.
 
#define PHPAL_I14443P4_SPARAM_FRAMEOPTION_SOF_EOF   0x02
 S(Param) Frameoption bit for Start/End of frame suppression.
 
#define PHPAL_I14443P4_SPARAM_FRAMEOPTION_SYNC   0x04
 S(Param) Frameoption bit for sync suppression.
 
#define PHPAL_I14443P4_SPARAM_DATARATE_RFU_MASK   0x80F0
 S(Param) Bitmask to check the RFU bits of the datarate.
 
#define PHPAL_I14443P4_SPARAM_DATARATE_RFU_BITS   0x0000
 S(Param) Expected RFU bits of the datarate.
 
#define PHPAL_I14443P4_SPARAM_BLOCK_INFO_TAG   0xA0
 Tag for S(Param) block info.
 
#define PHPAL_I14443P4_SPARAM_BIT_RATE_REQUEST   0xA1
 Tag for S(Param) bit rate request.
 
#define PHPAL_I14443P4_SPARAM_BIT_RATE_INDICATION   0xA2
 Tag for S(Param) bit rate indication.
 
#define PHPAL_I14443P4_SPARAM_BIT_RATE_ACTIVATION   0xA3
 Tag for S(Param) bit rate activation.
 
#define PHPAL_I14443P4_SPARAM_BIT_RATE_ACK   0xA4
 Tag for S(Param) bit rate acknowledgment.
 
#define PHPAL_I14443P4_SPARAM_FRAME_FORMAT_REQUEST   0xA5
 Tag for S(Param) frame format request.
 
#define PHPAL_I14443P4_SPARAM_FRAME_FORMAT_INDICATION   0xA6
 Tag for S(Param) frame format indication.
 
#define PHPAL_I14443P4_SPARAM_FRAME_FORMAT_ACTIVATION   0xA7
 Tag for S(Param) frame format activation.
 
#define PHPAL_I14443P4_SPARAM_FRAME_FORMAT_ACK   0xA8
 Tag for S(Param) frame format acknowledgment.
 
#define PHPAL_I14443P4A_SAMAV2_X_PPSS   0xD0U
 PPS Command code.
 
#define PHPAL_I14443P4A_SAMAV2_X_PPS0   0x11U
 PPS0 code.
 
#define PHPAL_I14443P4A_SAMAV2_X_ATS_LEN   0
 Position of LEN within ATS.
 
#define PHPAL_I14443P4A_SAMAV2_X_ATS_T0   1
 Position of T0 within ATS.
 
#define PHPAL_I14443P4A_SAMAV2_X_ATS_TA1_PRESENT   0x10U
 Bit which signals TA(1) presence.
 
#define PHPAL_I14443P4A_SAMAV2_X_ATS_TB1_PRESENT   0x20U
 Bit which signals TB(1) presence.
 
#define PHPAL_I14443P4A_SAMAV2_X_ATS_TC1_PRESENT   0x40U
 Bit which signals TC(1) presence.
 
#define PHPAL_I14443P4A_SAMAV2_X_ATS_TC1_NAD_SUPPORT   0x01U
 Bit within TC(1) which signals NAD support.
 
#define PHPAL_I14443P4A_SAMAV2_X_ATS_TC1_CID_SUPPORT   0x02U
 Bit within TC(1) which signals CID support.
 
#define PHPAL_I14443P4A_SAMAV2_X_FWI_DEFAULT   0x04U
 FWI default value.
 
#define PHPAL_I14443P4A_SAMAV2_X_FSCI_DEFAULT   0x02U
 FSCI default value.
 
#define PHPAL_I14443P4A_SAMAV3_X_PPSS   0xD0U
 PPS Command code.
 
#define PHPAL_I14443P4A_SAMAV3_X_PPS0   0x11U
 PPS0 code.
 
#define PHPAL_I14443P4A_SAMAV3_X_ATS_LEN   0
 Position of LEN within ATS.
 
#define PHPAL_I14443P4A_SAMAV3_X_ATS_T0   1
 Position of T0 within ATS.
 
#define PHPAL_I14443P4A_SAMAV3_X_ATS_TA1_PRESENT   0x10U
 Bit which signals TA(1) presence.
 
#define PHPAL_I14443P4A_SAMAV3_X_ATS_TB1_PRESENT   0x20U
 Bit which signals TB(1) presence.
 
#define PHPAL_I14443P4A_SAMAV3_X_ATS_TC1_PRESENT   0x40U
 Bit which signals TC(1) presence.
 
#define PHPAL_I14443P4A_SAMAV3_X_ATS_TC1_NAD_SUPPORT   0x01U
 Bit within TC(1) which signals NAD support.
 
#define PHPAL_I14443P4A_SAMAV3_X_ATS_TC1_CID_SUPPORT   0x02U
 Bit within TC(1) which signals CID support.
 
#define PHPAL_I14443P4A_SAMAV3_X_FWI_DEFAULT   0x04U
 FWI default value.
 
#define PHPAL_I14443P4A_SAMAV3_X_FSCI_DEFAULT   0x02U
 FSCI default value.
 
#define PHPAL_I14443P4A_SW_HALT_CMD   0x50U
 HltA Command code.
 
#define PHPAL_I14443P4A_SW_RATS   0xE0U
 Rats Command code.
 
#define PHPAL_I14443P4A_SW_PPSS   0xD0U
 PPS Command code.
 
#define PHPAL_I14443P4A_SW_PPS0   0x11U
 PPS0 code.
 
#define PHPAL_I14443P4A_SW_S_BLOCK   0xC0U
 ISO 14443-4 S-Block.
 
#define PHPAL_I14443P4A_SW_S_BLOCK_RFU_BITS   0x02U
 ISO 14443-4 S-Block RFU bits.
 
#define PHPAL_I14443P4A_SW_PCB_CID_FOLLOWING   0x08U
 Bit within PCB which signals presence of CID byte .
 
#define PHPAL_I14443P4A_SW_PCB_DESELECT   0x00U
 Bits within PCB which signal a DESELECT command.
 
#define PHPAL_I14443P4A_SW_FWT_ACTIVATION_US   4833
 Activation FTW in microseconds.
 
#define PHPAL_I14443P4A_SW_ATS_T0   1
 Position of T0 within ATS.
 
#define PHPAL_I14443P4A_SW_ATS_TA1_PRESENT   0x10U
 Bit which signals TA(1) presence.
 
#define PHPAL_I14443P4A_SW_ATS_TB1_PRESENT   0x20U
 Bit which signals TB(1) presence.
 
#define PHPAL_I14443P4A_SW_ATS_TC1_PRESENT   0x40U
 Bit which signals TC(1) presence.
 
#define PHPAL_I14443P4A_SW_ATS_TC1_NAD_SUPPORT   0x01U
 Bit within TC(1) which signals NAD support.
 
#define PHPAL_I14443P4A_SW_ATS_TC1_CID_SUPPORT   0x02U
 Bit within TC(1) which signals CID support.
 
#define PHPAL_I14443P4A_SW_FWI_DEFAULT   0x04U
 FWI default value.
 
#define PHPAL_I14443P4A_SW_SFGI_DEFAULT   0x00U
 SFGI default value.
 
#define PHPAL_I14443P4A_SW_FSCI_DEFAULT   0x02U
 FSCI default value.
 
#define PHPAL_I14443P4A_SW_FWT_MIN_US   303
 FTW min in microseconds.
 
#define PHPAL_I14443P4A_SW_HALT_TIME_US   1100U
 Wait time for halt command in microseconds.
 
#define PHPAL_I14443P4A_SW_EXT_TIME_US   60
 Time extension in microseconds for all commands. More...
 
#define PHPAL_I18092MPI_SW_IS_INVALID_BLOCK_STATUS(bStatus)
 Macro which checks for invalid block status.
 
#define PHPAL_I18092MPI_SW_IS_TIMEOUT(bPfb)
 Macro which checks if given PDU is timeout PDU.
 
#define PHPAL_I18092MPI_SW_IS_ATTENTION(bPfb)
 Macro which checks if given PDU is ATN PDU.
 
#define PHPAL_I18092MPI_SW_IS_ACK(bPfb)
 Macro which checks if given PDU is ACK PDU.
 
#define PHPAL_I18092MPI_SW_IS_NACK(bPfb)
 Macro which checks if given PDU is NACK PDU.
 
#define PHPAL_I18092MPI_SW_IS_CHAINING(bPfb)
 Macro which checks if given I-PDU is chaining.
 
#define PHPAL_I18092MPI_SW_IS_NOT_CHAINING(bPfb)
 Macro which checks if given I-PDU is not chaining.
 
#define PHPAL_I18092MPI_SW_IS_INFORMATION_PDU(bPfb)
 Macro which checks if given PDU is an I-PDU.
 
#define PHPAL_I18092MPI_SW_INCREMENT_PNI(bPni)   (((bPni) == 3) ? 0 : ((bPni) + 1))
 Macro used to increment PNI.
 
#define PHPAL_I18092MPI_SW_START_BYTE   0xF0U
 Start Byte to be added to the protocol header in case underlaying protocol is ISO14443.
 
#define PHPAL_I18092MPI_SW_CMD_REQUEST   0xD4U
 Request command code.
 
#define PHPAL_I18092MPI_SW_CMD_RESPONSE   0xD5U
 Response command code.
 
#define PHPAL_I18092MPI_SW_CMD_ATR_REQ   0x00U
 Attribute request command code.
 
#define PHPAL_I18092MPI_SW_ATR_PPI_LRI_BIT   0x04U
 Bit position of LRi field within PPi byte for attribute request command.
 
#define PHPAL_I18092MPI_SW_CMD_ATR_RES   0x01U
 Attribute response command code.
 
#define PHPAL_I18092MPI_SW_CMD_PSL_REQ   0x04U
 Parameter select request command code.
 
#define PHPAL_I18092MPI_SW_CMD_PSL_RES   0x05U
 Parameter select response command code.
 
#define PHPAL_I18092MPI_SW_CMD_DEP_REQ   0x06U
 Data exchange protocol request command code.
 
#define PHPAL_I18092MPI_SW_CMD_DEP_RES   0x07U
 Data exchange protocol response command code.
 
#define PHPAL_I18092MPI_SW_CMD_DSL_REQ   0x08U
 Deselect request command code.
 
#define PHPAL_I18092MPI_SW_CMD_DSL_RES   0x09U
 Deselect response command code.
 
#define PHPAL_I18092MPI_SW_CMD_RLS_REQ   0x0AU
 Release request command code.
 
#define PHPAL_I18092MPI_SW_CMD_RLS_RES   0x0BU
 Release response command code.
 
#define PHPAL_I18092MPI_SW_ATR_RES_NFCID3_POS   0x02U
 Position of NFCID3 within ATR_RES.
 
#define PHPAL_I18092MPI_SW_ATR_RES_DID_POS   12U
 Position of DID within ATR_RES.
 
#define PHPAL_I18092MPI_SW_ATR_RES_BST_POS   13U
 Position of BS(T) within ATR_RES.
 
#define PHPAL_I18092MPI_SW_ATR_RES_BRT_POS   14U
 Position of BR(T) within ATR_RES.
 
#define PHPAL_I18092MPI_SW_ATR_RES_TO_POS   15U
 Position of TO within ATR_RES.
 
#define PHPAL_I18092MPI_SW_ATR_RES_PPT_POS   16U
 Position of PP(T) within ATR_RES.
 
#define PHPAL_I18092MPI_SW_ATR_RES_PPT_GT_AVAILABLE   0x02U
 Gt_available bit wihtin PP(T) byte of ATR_RES.
 
#define PHPAL_I18092MPI_SW_ATR_RES_PPT_NAD_USED   0x01U
 NAD_used bit wihtin PP(T) byte of ATR_RES.
 
#define PHPAL_I18092MPI_SW_PFB_INFORMATION_PDU_MASK   0x00U
 Bit mask within PFB identifying an information PDU.
 
#define PHPAL_I18092MPI_SW_PFB_ACK_PDU_MASK   0x40U
 Bit mask within PFB identifying an ACK/NACK PDU.
 
#define PHPAL_I18092MPI_SW_PFB_SUPERVISORY_PDU_MASK   0x80U
 Bit mask within PFB identifying a supervisory PDU.
 
#define PHPAL_I18092MPI_SW_PFB_PDU_TYPE_MASK   0xE0U
 Bit mask within PFB to get type of PDU.
 
#define PHPAL_I18092MPI_SW_PFB_NAD_MASK   0x08U
 Bit mask within PFB for checking NAD enabler.
 
#define PHPAL_I18092MPI_SW_PFB_DID_MASK   0x04U
 Bit mask within PFB for checking DID enabler.
 
#define PHPAL_I18092MPI_SW_PFB_PNI_MASK   0x03U
 Bit mask within PFB for getting PNI.
 
#define PHPAL_I18092MPI_SW_PFB_OPTION_MASK   0x10U
 Bit mask within PDU for getting option field (=ACK or ATTENTION or MI).
 
#define PHPAL_I18092MPI_SW_DELTA_T_INITIATOR_MS   100U
 Activation response waiting time in milliseconds, NFCForum-TS-DigitalProtocol-1.0 section A.10.
 
#define PHPAL_I18092MPI_SW_DELTA_RWT_US   2U
 Time extension in microseconds for all commands, NFCForum-TS-DigitalProtocol-1.0 section A.10.
 
#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.
 
#define PHPAL_I18092MPI_SW_RWT_MAX_US   4947968UL
 Maximum response waiting time, ISO/IEC 18092:2004(E) section A.10.
 
#define PHPAL_I18092MPI_SW_MIN_FRAMESIZE   3U
 Minimum frame size, NFCForum-TS-DigitalProtocol-1.0.
 
#define PHPAL_I18092MPI_SW_MAX_FRAMESIZE   255U
 Maximum frame size, NFCForum-TS-DigitalProtocol-1.0.
 
#define PHPAL_I18092MPI_SW_MAX_RETRIES   5U
 Maximum Retry count, NFCForum-TS-DigitalProtocol-1.0 section A.10.
 
#define PHPAL_I18092MPI_SW_MAX_RETRIES_DEFAULT   2U
 Default (=minimum) Maximum Retry count, NFCForum-TS-DigitalProtocol-1.0 section A.10.
 
#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.
 
#define PHPAL_I18092MPI_SW_STATE_ACK_PDU_TX   0x01U
 State ACK PDU to be transmitted.
 
#define PHPAL_I18092MPI_SW_STATE_INFORMATION_PDU_RX   0x02U
 State information PDU to be received.
 
#define PHPAL_I18092MPI_SW_STATE_FINISHED   0x03U
 Finished state.
 
#define PHPAL_I18092MPI_SW_STATE_MASK   0x0FU
 State mask.
 
#define PHPAL_I18092MPI_SW_STATE_RETRANSMIT_BIT   0x10U
 Retransmission of information PDU.
 
#define PHPAL_I18092MPI_SW_STATE_CHAINING_BIT   0x20U
 Information PDU is chaining.
 
#define PHPAL_I18092MPI_SW_STATE_CHAINING_FIRST_BIT   0x40U
 Information PDU is first block in chain.
 
#define PHPAL_I18092MPI_SW_STATE_CHAINING_LAST_BIT   0x80U
 Information PDU is last block in chain.
 
#define PHPAL_I18092MPI_SW_MAX_HEADER_LENGTH   0x07U
 Max length of the Header.
 
#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 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_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_Int_SetMode (void *phPort, uint32_t dwBitRate, uint8_t bStopBits, uint8_t bParity, uint8_t bDtr, uint8_t bRts)
 Change host bit rate. More...
 
phStatus_t phbalReg_SerialWin_Int_SetTimeout (phbalReg_SerialWin_DataParams_t *pDataParams)
 Change reception timeout. More...
 
phStatus_t phbalReg_SerialWin_Int_SetBitRate (void *phPort, uint32_t dwBitRate)
 
phStatus_t phhalHw_SamAV2_Hc_AV1_Int_GenerateSessionKey (uint8_t *pKey, uint16_t keyType, uint8_t *pRndAData, uint8_t *pRndBData, uint8_t *pSessionKey)
 
phStatus_t phhalHw_SamAV2_Hc_AV1_Int_EncodeVersionInDESKey (uint8_t *pKey, uint8_t KeyVersion, uint8_t round, uint8_t *pEncodedKey)
 Encode the KeyVersion in a DES or 3KDES. More...
 
phStatus_t phhalHw_SamAV2_Hc_AV2_Int_GenerateAuthEncKey (phhalHw_SamAV2_DataParams_t *pDataParams, uint8_t keyType, uint8_t *pRnd1Data, uint8_t *pRnd2Data, uint8_t *pSessionKey, uint8_t *pKeyLength)
 
phStatus_t phhalHw_SamAV2_Hc_AV2_Int_GenerateSessionKey (phhalHw_SamAV2_DataParams_t *pDataParams, uint8_t keyType, uint8_t *pRndAData, uint8_t *pRndBData, uint8_t *pEncSessionKey, uint8_t *pMacSessionKey, uint8_t *pKeyLength)
 
phStatus_t phhalHw_SamAV2_UpdateLc (phhalHw_SamAV2_DataParams_t *pDataParams)
 Update LC byte according to data already available in Buffer. More...
 
phStatus_t phhalHw_SamAV2_UpdateP2 (phhalHw_SamAV2_DataParams_t *pDataParams, uint8_t p2)
 Update P1byte according to data already available in Buffer. More...
 
phStatus_t phhalHw_SamAV2_Rc663_SetCardMode (phhalHw_SamAV2_DataParams_t *pDataParams, uint16_t wTxDataRate, uint16_t wRxDataRate)
 Apply card mode according to given parameters. More...
 
phStatus_t phhalHw_SamAV2_Rc523_SetConfig (phhalHw_SamAV2_DataParams_t *pDataParams, uint16_t wConfig, uint16_t wValue)
 Set configuration parameter. More...
 
phStatus_t phhalHw_SamAV2_Rc523_Wait (phhalHw_SamAV2_DataParams_t *pDataParams, uint8_t bUnit, uint16_t wTimeout)
 Blocks until the time given by wTimeout elapsed. More...
 
phStatus_t phhalHw_SamAV2_Rc523_SetFdt (phhalHw_SamAV2_DataParams_t *pDataParams, uint8_t bUnit, uint16_t wTimeout)
 Sets the Frame Delay Time (Timeout). More...
 
phStatus_t phhalHw_SamAV2_Rc523_GetFdt (phhalHw_SamAV2_DataParams_t *pDataParams, uint32_t *pTime)
 Retrieves the Frame Delay Time of the last command. More...
 
phStatus_t phhalHw_SamAV2_Rc663_SetConfig (phhalHw_SamAV2_DataParams_t *pDataParams, uint16_t wConfig, uint16_t wValue)
 Set configuration parameter. More...
 
phStatus_t phhalHw_SamAV2_Rc663_Wait (phhalHw_SamAV2_DataParams_t *pDataParams, uint8_t bUnit, uint16_t wTimeout)
 Blocks until the time given by wTimeout elapsed. More...
 
phStatus_t phhalHw_SamAV2_Rc663_SetRxWait (phhalHw_SamAV2_DataParams_t *pDataParams, uint16_t wTimeEtu)
 Sets the RxWait time. More...
 
phStatus_t phhalHw_SamAV2_Rc663_SetTxWait (phhalHw_SamAV2_DataParams_t *pDataParams, uint16_t wTimeUs)
 Sets the TxWait time in microseconds. More...
 
phStatus_t phhalHw_SamAV2_Rc663_SetFdt (phhalHw_SamAV2_DataParams_t *pDataParams, uint8_t bUnit, uint16_t wTimeout)
 Sets the Frame Delay Time (Timeout). More...
 
phStatus_t phhalHw_SamAV2_Rc663_GetFdt (phhalHw_SamAV2_DataParams_t *pDataParams, phStatus_t wExchangeStatus, uint32_t *pTime)
 Retrieves the Frame Delay Time of the last command. More...
 
phStatus_t phhalHw_SamAV2_Rc663_GetDigiDelay (phhalHw_SamAV2_DataParams_t *pDataParams, uint8_t bIsTimeout, uint16_t *pDelayUs)
 Returns the delay of the digital circutry for the current protocol. More...
 
phStatus_t phhalHw_SamAV3_Rc523_SetConfig (phhalHw_SamAV3_DataParams_t *pDataParams, uint16_t wConfig, uint16_t wValue)
 Set configuration parameter. More...
 
phStatus_t phhalHw_SamAV3_Rc523_Wait (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bUnit, uint16_t wTimeout)
 Blocks until the time given by wTimeout elapsed. More...
 
phStatus_t phhalHw_SamAV3_Rc523_SetFdt (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bUnit, uint16_t wTimeout)
 Sets the Frame Delay Time (Timeout). More...
 
phStatus_t phhalHw_SamAV3_Rc523_GetFdt (phhalHw_SamAV3_DataParams_t *pDataParams, uint32_t *pTime)
 Retrieves the Frame Delay Time of the last command. More...
 
phStatus_t phhalHw_SamAV3_Rc663_SetCardMode (phhalHw_SamAV3_DataParams_t *pDataParams, uint16_t wTxDataRate, uint16_t wRxDataRate)
 Apply card mode according to given parameters. More...
 
phStatus_t phhalHw_SamAV3_Rc663_SetConfig (phhalHw_SamAV3_DataParams_t *pDataParams, uint16_t wConfig, uint16_t wValue)
 Set configuration parameter. More...
 
phStatus_t phhalHw_SamAV3_Rc663_Wait (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bUnit, uint16_t wTimeout)
 Blocks until the time given by wTimeout elapsed. More...
 
phStatus_t phhalHw_SamAV3_Rc663_SetRxWait (phhalHw_SamAV3_DataParams_t *pDataParams, uint16_t wTimeEtu)
 Sets the RxWait time. More...
 
phStatus_t phhalHw_SamAV3_Rc663_SetTxWait (phhalHw_SamAV3_DataParams_t *pDataParams, uint16_t wTimeUs)
 Sets the TxWait time in microseconds. More...
 
phStatus_t phhalHw_SamAV3_Rc663_SetFdt (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bUnit, uint16_t wTimeout)
 Sets the Frame Delay Time (Timeout). More...
 
phStatus_t phhalHw_SamAV3_Rc663_GetFdt (phhalHw_SamAV3_DataParams_t *pDataParams, phStatus_t wExchangeStatus, uint32_t *pTime)
 Retrieves the Frame Delay Time of the last command. More...
 
phStatus_t phhalHw_SamAV3_Rc663_GetDigiDelay (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bIsTimeout, uint16_t *pDelayUs)
 Returns the delay of the digital circutry for the current protocol. More...
 
phStatus_t phKeyStore_SamAV2_Int_GetKeyEntry (phKeyStore_SamAV2_DataParams_t *pDataParams, uint8_t bKeyNumber, phKeyStore_SamAV2_KeyEntry_t *pKeyEntry)
 
phStatus_t phKeyStore_SamAV2_Int_ConvertKeyEntryToBuffer (phKeyStore_SamAV2_KeyEntry_t *pKeyEntry, uint8_t *pKeyA, uint8_t *pKeyB, uint8_t *pKeyC, uint8_t *pKeyEntryBuffer)
 
phLog_RegisterEntry_tphLog_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 phpalEpcUid_Sw_ParseResponse (phpalEpcUid_Sw_DataParams_t *pDataParams, uint8_t *pRxBuffer, uint16_t wRxLength)
 Parse EPC/UID response after BeginRound / CloseSlot Command. 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_Int_BuildSParamBlock (uint8_t bCidEnabled, uint8_t bCid, uint8_t *pTxBuffer, uint16_t *pTxLength)
 Build S-Param 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 phpalI14443p4_Sw_Int_ExchangeSParamFrame (phpalI14443p4_Sw_DataParams_t *pDataParams, uint8_t *pDataIn, uint16_t wDataInLength, uint8_t *pDataOut, uint16_t wDataOutSize, uint16_t *pwDataOutLength)
 Perform an exchange of an S(param) frame and take care about error handling etc. More...
 
phStatus_t phpalI14443p4_Sw_Int_Parse_TLV_Len (uint8_t *pData, uint16_t wDataLen, uint16_t wLengthOffset, uint32_t *pdwLengthValue, uint16_t *pwLengthLength)
 Parse the length of an TLV object. More...
 
phStatus_t phpalI14443p4_Sw_Int_Attach_TLV_Header (uint8_t *pData, uint32_t wDataLen, uint32_t wDataOffset, uint8_t bTag, uint16_t *pwDataWritten)
 Attache the tag and the length object before the data. More...
 
phStatus_t phpalI14443p4_Sw_Int_SParamCheckSuppliedParameter (phpalI14443p4_Sw_DataParams_t *pDataParams, phpalI14443p4_Sw_SParam_Param *pParameter)
 Check the supplied parameters of an S(PARAM) request. More...
 
phStatus_t phpalI14443p4_Sw_Int_SParamExtractIndicatedParam (phpalI14443p4_Sw_DataParams_t *pDataParams, phpalI14443p4_Sw_SParam_Param *pParameter, uint8_t *pbSParamDataBuffer, uint16_t wSParamDataLen, uint8_t bBitRateIndicationSupported, uint8_t bFrameFormatIndicationSupported)
 Extract the indicated data of an S(PARAM) indication. More...
 
phStatus_t phpalI14443p4_Sw_Int_SParamCheckSuppliedParameterAreSupported (phpalI14443p4_Sw_SParam_Param *pParameter)
 Check if the supplied parameter are supported by the indicated parameter an S(PARAM) indication. More...
 
phStatus_t phpalI14443p4_Sw_Int_SParamGetAutoParameter (phpalI14443p4_Sw_DataParams_t *pDataParams, phpalI14443p4_Sw_SParam_Param *pParameter)
 Automaticly gets the 'best' parameter for the S(Param) activation form the S(PARAM) indication. More...
 
phStatus_t phpalI14443p4_Sw_Int_SParamBuildActivateData (phpalI14443p4_Sw_DataParams_t *pDataParams, phpalI14443p4_Sw_SParam_Param *pParameter, uint8_t *pbSParamDataBuffer, uint16_t wSParamDataSize, uint16_t *pwSParamDataStartPos, uint8_t bBitRateIndicationSupported, uint8_t bFrameFormatIndicationSupported)
 Build the S(Param) activation command. More...
 
phStatus_t phpalI14443p4_Sw_Int_SParamApplyParameter (phpalI14443p4_Sw_DataParams_t *pDataParams, phpalI14443p4_Sw_SParam_Param *pParameter)
 Applies the activated parameters to the hardware. More...
 
phStatus_t phpalI14443p4_Sw_Int_VHBR_Exchange (phpalI14443p4_Sw_DataParams_t *pDataParams, uint16_t wOption, uint8_t *pTxBuffer, uint16_t wTxLength, uint8_t **ppRxBuffer, uint16_t *pRxLength)
 Perform Data Exchange with Picc. More...
 
phStatus_t phpalI14443p4_Sw_Int_VHBR_GetRxTxBufferSize (phpalI14443p4_Sw_DataParams_t *pDataParams, uint16_t *pwRxBufferSize, uint16_t *pwTxBufferSize)
 Get the max possible buffer size for Rx and Tx buffer possible with current config and reader. More...
 
phStatus_t phpalI14443p4_Sw_Int_VHBR_GetNumberOfPreloadedBytes (phpalI14443p4_Sw_DataParams_t *pDataParams, uint16_t *pwNumberPreloadedBytes)
 Get the number of preloaded bytes (either in FWEC buffer or in reader buffer) More...
 
phStatus_t phpalI14443p4_Sw_Int_VHBR_GetTxPCB (phpalI14443p4_Sw_DataParams_t *pDataParams, uint16_t *pwPCB)
 Get the stored PCB byte. More...
 
phStatus_t phpalI14443p4_Sw_Int_VHBR_SetTxPCB (phpalI14443p4_Sw_DataParams_t *pDataParams, uint8_t bPCB)
 Change the stored PCB byte. More...
 
phStatus_t phpalI14443p4_Sw_Int_VHBR_SetTxBufferLen (phpalI14443p4_Sw_DataParams_t *pDataParams, uint16_t wTxBufferLen)
 Change the TxBufferLen. More...
 
phStatus_t phpalI14443p4_Sw_Int_VHBR_SetRxBufferStartPos (phpalI14443p4_Sw_DataParams_t *pDataParams, uint16_t wRxBufferStartPos)
 Change Rx Buffer Start Pos. More...
 
phStatus_t phpalI14443p4_Sw_Int_VHBR_GetRxBufferStartPos (phpalI14443p4_Sw_DataParams_t *pDataParams, uint16_t *pwRxBufferStartPos)
 Get Rx Buffer Start Pos. More...
 
phStatus_t phpalI14443p4_Sw_Int_VHBR_FormatBlockFWEC (uint8_t *pTxBuffer, uint16_t wTxSize, uint16_t wTxLen, uint8_t *pEnhancedBlock, uint16_t wEnhancedBlockSize, uint16_t *pwEnhancedBlockLen)
 Formats a given Buffer for FWEC Exchange. More...
 
phStatus_t phpalI14443p4_Sw_Int_VHBR_FormatRecvBlockFWEC (uint8_t *pRxEnhancedBlock, uint16_t wRxEnhancedBlockLen, uint8_t *pRxBuffer, uint16_t wRxBufferSize, uint16_t *pwRxLen, uint16_t *pwRxStartPos)
 Converts a recieved Buffer from FWEC Format to normal data. 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 phpalMifare_SamAV2_X_ConvertNak (phStatus_t status)
 Convert HAL Nak codes into palMifare NAK codes. More...
 
phStatus_t phpalMifare_SamAV3_X_ConvertNak (phStatus_t status)
 Convert HAL Nak codes into palMifare NAK codes. More...
 

Felica Command Codes

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

Command Codes

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

I180000 Error Codes

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

MIFARE DESFire Native Commands

#define PHAL_MFDFEVX_CMD_INVALID   0xFF
 INVALID Command code.
 
#define PHAL_MFDFEVX_CMD_AUTHENTICATE   0x0A
 MFDFEVx Authenticate command.
 
#define PHAL_MFDFEVX_CMD_AUTHENTICATE_ISO   0x1A
 MFDFEVx Authenticate ISO command.
 
#define PHAL_MFDFEVX_CMD_AUTHENTICATE_AES   0xAA
 MFDFEVx Authenticate AES command.
 
#define PHAL_MFDFEVX_CMD_AUTHENTICATE_EV2_FIRST   0x71
 MFDFEVx Authenticate EV2 First command.
 
#define PHAL_MFDFEVX_CMD_AUTHENTICATE_EV2_NON_FIRST   0x77
 MFDFEVx Authenticate EV2 Non First command.
 
#define PHAL_MFDFEVX_CMD_AUTHENTICATE_PART2   0xAF
 MFDFEVx Authentication second part; 0xAF.
 
#define PHAL_MFDFEVX_CMD_CHANGE_KEY_SETTINGS   0x54
 MFDFEVx Change key settings command.
 
#define PHAL_MFDFEVX_CMD_GET_KEY_SETTINGS   0x45
 MFDFEVx Get Key Settings command. More...
 
#define PHAL_MFDFEVX_CMD_CHANGE_KEY   0xC4
 MFDFEVx Change key command.
 
#define PHAL_MFDFEVX_CMD_CHANGE_KEY_EV2   0xC6
 MFDFEVx Change key stored on PICC command.
 
#define PHAL_MFDFEVX_CMD_GET_KEY_VERSION   0x64
 MFDFEVx Get Key Version.
 
#define PHAL_MFDFEVX_CMD_INITIALIZE_KEY_SET   0x56
 MFDFEVx Initialize a key set command.
 
#define PHAL_MFDFEVX_CMD_FINALIZE_KEY_SET   0x57
 MFDFEVx Finalize a key set command.
 
#define PHAL_MFDFEVX_CMD_ROLL_KEY_SET   0x55
 MFDFEVx Roll to a new key set command.
 
#define PHAL_MFDFEVX_CMD_CREATE_APPLN   0xCA
 MFDFEVx Create Application command.
 
#define PHAL_MFDFEVX_CMD_CREATE_DELEGATED_APPLN   0xC9
 MFDFEVx Create Delegated Application command.
 
#define PHAL_MFDFEVX_CMD_DELETE_APPLN   0xDA
 MFDFEVx Delete Application command.
 
#define PHAL_MFDFEVX_CMD_GET_APPLN_IDS   0x6A
 MFDFEVx Get Application Ids command.
 
#define PHAL_MFDFEVX_CMD_GET_DF_NAMES   0x6D
 MFDFEVx Get Dedicated Fine names command.
 
#define PHAL_MFDFEVX_CMD_GET_DELEGATED_INFO   0x69
 MFDFEVx Get Delegated info command.
 
#define PHAL_MFDFEVX_CMD_SELECT_APPLN   0x5A
 MFDFEVx Select Application command.
 
#define PHAL_MFDFEVX_CMD_FORMAT   0xFC
 MFDFEVx Format PICC command.
 
#define PHAL_MFDFEVX_CMD_GET_VERSION   0x60
 MFDFEVx Get Version command.
 
#define PHAL_MFDFEVX_CMD_FREE_MEM   0x6E
 MFDFEVx Free Memory command.
 
#define PHAL_MFDFEVX_CMD_SET_CONFIG   0x5C
 MFDFEVx Set Configuration command.
 
#define PHAL_MFDFEVX_CMD_GET_CARD_UID   0x51
 MFDFEVx Get Card UID command.
 
#define PHAL_MFDFEVX_CMD_GET_FILE_IDS   0x6F
 MFDFEVx Get File IDs command.
 
#define PHAL_MFDFEVX_CMD_GET_ISO_FILE_IDS   0x61
 MFDFEVx Get ISO File IDs command.
 
#define PHAL_MFDFEVX_CMD_GET_FILE_SETTINGS   0xF5
 MFDFEVx Get File settings command.
 
#define PHAL_MFDFEVX_CMD_GET_FILE_COUNTERS   0xF6
 MFDFEVx Get File Counters command.
 
#define PHAL_MFDFEVX_CMD_CHANGE_FILE_SETTINGS   0x5F
 MFDFEVx Change file settings command.
 
#define PHAL_MFDFEVX_CMD_CREATE_STD_DATAFILE   0xCD
 MFDFEVx Create Standard data file command.
 
#define PHAL_MFDFEVX_CMD_CREATE_BKUP_DATAFILE   0xCB
 MFDFEVx Create Backup data file command.
 
#define PHAL_MFDFEVX_CMD_CREATE_VALUE_FILE   0xCC
 MFDFEVx Create Value File command.
 
#define PHAL_MFDFEVX_CMD_CREATE_LINEAR_RECFILE   0xC1
 MFDFEVx Create Linear record file command.
 
#define PHAL_MFDFEVX_CMD_CREATE_CYCLIC_RECFILE   0xC0
 MFDFEVx Create Cyclic record file command.
 
#define PHAL_MFDFEVX_CMD_CREATE_TRANSTN_MACFILE   0xCE
 MFDFEVx Create Transaction MAC file command.
 
#define PHAL_MFDFEVX_CMD_DELETE_FILE   0xDF
 MFDFEVx Delete File command.
 
#define PHAL_MFDFEVX_CMD_READ_DATA   0xBD
 MFDFEVx Read Data command.
 
#define PHAL_MFDFEVX_CMD_READ_DATA_ISO   0xAD
 MFDFEVx Read Data command using ISO chaining.
 
#define PHAL_MFDFEVX_CMD_WRITE_DATA   0x3D
 MFDFEVx Write data command.
 
#define PHAL_MFDFEVX_CMD_WRITE_DATA_ISO   0x8D
 MFDFEVx Write data command using ISO chaining.
 
#define PHAL_MFDFEVX_CMD_GET_VALUE   0x6C
 MFDFEVx Get Value command.
 
#define PHAL_MFDFEVX_CMD_CREDIT   0x0C
 MFDFEVx Credit command.
 
#define PHAL_MFDFEVX_CMD_DEBIT   0xDC
 MFDFEVx Debit command.
 
#define PHAL_MFDFEVX_CMD_LIMITED_CREDIT   0x1C
 MFDFEVx Limited Credit command.
 
#define PHAL_MFDFEVX_CMD_WRITE_RECORD   0x3B
 MFDFEVx Write Record command.
 
#define PHAL_MFDFEVX_CMD_WRITE_RECORD_ISO   0x8B
 MFDFEVx Write Record command using ISO chaining.
 
#define PHAL_MFDFEVX_CMD_UPDATE_RECORD   0xDB
 MFDFEVx Update Record command.
 
#define PHAL_MFDFEVX_CMD_UPDATE_RECORD_ISO   0xBA
 MFDFEVx Update Record command using ISO chaining.
 
#define PHAL_MFDFEVX_CMD_READ_RECORDS   0xBB
 MFDFEVx Read Records command.
 
#define PHAL_MFDFEVX_CMD_READ_RECORDS_ISO   0xAB
 MFDFEVx Read Records command using ISO chaining.
 
#define PHAL_MFDFEVX_CMD_UPDATE_RECORDS   0xF0
 MFDFEVx Update Records command.
 
#define PHAL_MFDFEVX_CMD_CLEAR_RECORD_FILE   0xEB
 MFDFEVx Clear records file command.
 
#define PHAL_MFDFEVX_CMD_COMMIT_TXN   0xC7
 MFDFEVx Commit transaction command.
 
#define PHAL_MFDFEVX_CMD_ABORT_TXN   0xA7
 MFDFEVx Abort transaction command.
 
#define PHAL_MFDFEVX_CMD_COMMIT_READER_ID   0xC8
 MFDFEVx Commit Reader ID command.
 
#define PHAL_MFDFEVX_CMD_READ_SIG   0x3C
 MFDFEVx Verify read signature command.
 
#define PHAL_MFDFEVX_CMD_FORMAT_PICC   0xFC
 MFDFEVx Format PICC command.
 
#define PHAL_MFDFEVX_CMD_CLEAR_RECORDS_FILE   0xEB
 MFDFEVx Clear records file command.
 
#define PHAL_MFDFEVX_CMD_AUTH_PDC   0x7C
 MFDFEVx Post Delivery Command.
 
#define PHAL_MFDFEVX_CMD_AUTH2   0x72
 MFDFEVx Authenticate command (part 2).
 
#define PHAL_MFDFEVX_CMD_CREATE_MFC_MAPPING   0xCF
 MFDFEVx CreateMFCMapping.
 
#define PHAL_MFDFEVX_CMD_RESTORE_TRANSFER   0xB1
 MFDFEVx RestoreTransfer.
 
#define PHAL_MFDFEVX_CMD_RESTORE_SHADOW   0xB5
 MFDFEVx RestoreShadow.
 
#define PHAL_MFDFEVX_CMD_RESTRICT_MFC_UPDATE   0xBF
 MFDFEVx RestrictMFCUpdate.
 

MIFARE DESFire Response Codes

#define PHAL_MFDFEVX_RESP_OPERATION_OK   0x00U
 MFDFEVx Response - Successful operation.
 
#define PHAL_MFDFEVX_RESP_OPERATION_OK_LIM   0x01U
 MFDFEVx Response - Successful operation with limited functionality.
 
#define PHAL_MFDFEVX_RESP_OK   0x90U
 MFDFEVx Response - Successful operation.
 
#define PHAL_MFDFEVX_RESP_NO_CHANGES   0x0CU
 MFDFEVx Response - No changes done to backup files.
 
#define PHAL_MFDFEVX_RESP_ERR_NOT_SUP   0x0DU
 MFDFEVx Not Supported Error.
 
#define PHAL_MFDFEVX_RESP_ERR_OUT_OF_EEPROM_ERROR   0x0EU
 MFDFEVx Response - Insufficient NV-Memory.
 
#define PHAL_MFDFEVX_RESP_ILLEGAL_COMMAND_CODE   0x1CU
 MFDFEVx command code not supported.
 
#define PHAL_MFDFEVX_RESP_ERR_INTEGRITY_ERROR   0x1EU
 MFDFEVx CRC or MAC does not match data padding bytes not valid.
 
#define PHAL_MFDFEVX_RESP_NO_SUCH_KEY   0x40U
 MFDFEVx Invalid key number specified.
 
#define PHAL_MFDFEVX_RESP_CHAINING   0x71U
 MFDFEVx ISO Chaining Status.
 
#define PHAL_MFDFEVX_RESP_ERR_LENGTH_ERROR   0x7EU
 MFDFEVx Length of command string invalid.
 
#define PHAL_MFDFEVX_RESP_PERMISSION_DENIED   0x9DU
 MFDFEVx Current configuration/status does not allow the requested command.
 
#define PHAL_MFDFEVX_RESP_ERR_PARAMETER_ERROR   0x9EU
 MFDFEVx Value of params invalid.
 
#define PHAL_MFDFEVX_RESP_APPLICATION_NOT_FOUND   0xA0U
 MFDFEVx Requested AID not found on PICC.
 
#define PHAL_MFDFEVX_RESP_ERR_APPL_INTEGRITY_ERROR   0xA1U
 MFDFEVx Unrecoverable error within application, appln will be disabled.
 
#define PHAL_MFDFEVX_RESP_ERR_AUTHENTICATION_ERROR   0xAEU
 MFDFEVx Current authentication status does not allow the requested command.
 
#define PHAL_MFDFEVX_RESP_ADDITIONAL_FRAME   0xAFU
 MFDFEVx Additional data frame is expected to be sent.
 
#define PHAL_MFDFEVX_RESP_ERR_BOUNDARY_ERROR   0xBEU
 MFDFEVx Attempt to read/write data from/to beyond the files/record's limits.
 
#define PHAL_MFDFEVX_RESP_ERR_PICC_INTEGRITY   0xC1U
 MFDFEVx Unrecoverable error within PICC. More...
 
#define PHAL_MFDFEVX_RESP_ERR_COMMAND_ABORTED   0xCAU
 MFDFEVx Previous command not fully completed. More...
 
#define PHAL_MFDFEVX_RESP_ERR_PIC_DISABLED   0xCDU
 MFDFEVx PICC was disabled by an unrecoverable error.
 
#define PHAL_MFDFEVX_RESP_ERR_COUNT   0xCEU
 MFDFEVx Num. More...
 
#define PHAL_MFDFEVX_RESP_ERR_DUPLICATE   0xDEU
 MFDFEVx File/Application with same number already exists.
 
#define PHAL_MFDFEVX_RESP_ERR_EEPROM   0xEEU
 MFDFEVx Could not complete NV-Write operation due to loss of power.
 
#define PHAL_MFDFEVX_RESP_ERR_FILE_NOT_FOUND   0xF0U
 MFDFEVx Specified file number does not exist.
 
#define PHAL_MFDFEVX_RESP_ERR_FILE_INTEGRITY   0xF1U
 MFDFEVx Unrecoverable error within file. More...
 
#define PHAL_MFDFEVX_RESP_ERR_AUTH_ERROR   0x06U
 MFDFEVx Authentication error.
 
#define PHAL_MFDFEVX_RESP_ERR_CMD_BNR   0x09U
 MFDFEVx Invalid Block number: not existing in the implementation or not valid to target with this command.
 
#define PHAL_MFDFEVX_RESP_ERR_CMD_ERR_FORMAT   0x0CU
 MFDFEVx Format of the command is not correct (e.g. More...
 
#define PHAL_MFDFEVX_RESP_ERR_CMD_GEN_FAILURE   0x0FU
 MFDFEVx Failure in the operation of the PD.
 

ISO 7816 Instructions

#define PHAL_MFDFEVX_CMD_ISO7816_SELECT_FILE   0xA4
 ISO Select File.
 
#define PHAL_MFDFEVX_CMD_ISO7816_READ_RECORDS   0xB2
 ISO Read records.
 
#define PHAL_MFDFEVX_CMD_ISO7816_READ_BINARY   0xB0
 ISO Read Binary.
 
#define PHAL_MFDFEVX_CMD_ISO7816_UPDATE_BINARY   0xD6
 ISO UPDATE Binary.
 
#define PHAL_MFDFEVX_CMD_ISO7816_APPEND_RECORD   0xE2
 ISO Append record.
 
#define PHAL_MFDFEVX_CMD_ISO7816_UPDATE_RECORD   0xD2
 ISO Update record.
 
#define PHAL_MFDFEVX_CMD_ISO7816_GET_CHALLENGE   0x84
 ISO Get challenge.
 
#define PHAL_MFDFEVX_CMD_ISO7816_EXT_AUTHENTICATE   0x82
 ISO Ext. More...
 
#define PHAL_MFDFEVX_CMD_ISO7816_INT_AUTHENTICATE   0x88
 ISO Int. More...
 

MIFARE DESFire specific defines

#define PHAL_MFDFEVX_MAXWRAPPEDAPDU_SIZE   0x37u
 Maximum size of wrapped APDU 55 bytes.
 
#define PHAL_MFDFEVX_MAXDFAPDU_SIZE   0x3Cu
 Maximum size of DESFire APDU 60 bytes.
 
#define PHAL_MFDFEVX_DFAPPID_SIZE   0x03u
 Size of MFDFEVx application Id.
 
#define PHAL_MFDFEVX_DATA_BLOCK_SIZE   0x10u
 Data block size need for internal purposes.
 
#define PHAL_MFDFEVX_MAX_FRAME_SIZE   0x40u
 Max size in a ISO 14443-4 frame.
 

ISO 7816 DFEVx return Codes

#define PHAL_MFDFEVX_ISO7816_SUCCESS   0x9000U
 Correct execution.
 
#define PHAL_MFDFEVX_ISO7816_ERR_WRONG_LENGTH   0x6700U
 Wrong length.
 
#define PHAL_MFDFEVX_ISO7816_ERR_INVALID_APPLN   0x6A82U
 Application / file not found.
 
#define PHAL_MFDFEVX_ISO7816_ERR_WRONG_PARAMS   0x6A86U
 Wrong parameters P1 and/or P2.
 
#define PHAL_MFDFEVX_ISO7816_ERR_WRONG_LC   0x6A87U
 LC inconsistent with P1/p2.
 
#define PHAL_MFDFEVX_ISO7816_ERR_WRONG_LE   0x6C00U
 Wrong Le.
 
#define PHAL_MFDFEVX_ISO7816_ERR_NO_PRECISE_DIAGNOSTICS   0x6F00U
 No precise diagnostics.
 
#define PHAL_MFDFEVX_ISO7816_ERR_EOF_REACHED   0x6282U
 End of File reached.
 
#define PHAL_MFDFEVX_ISO7816_ERR_FILE_ACCESS   0x6982U
 File access not allowed.
 
#define PHAL_MFDFEVX_ISO7816_ERR_FILE_EMPTY   0x6985U
 File empty or access conditions not satisfied.
 
#define PHAL_MFDFEVX_ISO7816_ERR_FILE_NOT_FOUND   0x6A82U
 File not found.
 
#define PHAL_MFDFEVX_ISO7816_ERR_MEMORY_FAILURE   0x6581U
 Memory failure (unsuccessful update).
 
#define PHAL_MFDFEVX_ISO7816_ERR_INCORRECT_PARAMS   0x6B00U
 Wrong parameter p1 or p2. More...
 
#define PHAL_MFDFEVX_ISO7816_ERR_WRONG_CLA   0x6E00U
 Wrong Class byte.
 
#define PHAL_MFDFEVX_ISO7816_ERR_UNSUPPORTED_INS   0x6D00U
 Instruction not supported.
 
#define PHAL_MFDFEVX_ISO7816_ERR_LIMITED_FUNCTIONALITY_INS   0x6283U
 Limited Functionality.
 

Proximity Check return Codes

#define PHAL_MFDFEVX_RESP_ERR_CMD_OVERFLOW   0x07U
 MFDFEVx Too many commands in the session or transaction.
 
#define PHAL_MFDFEVX_RESP_ERR_CMD_OVERFLOW   0x07U /*< MFDFEVx Command Overflow Error. */
 MFDFEVx Too many commands in the session or transaction.
 
#define PHAL_MFDFEVX_RESP_ERR_CMD_INVALID   0x0BU
 MFDFEVx Command is received in a state where this command is not supported, or a totally unknown command is received.
 
#define PHAL_MFDFEVX_RESP_ERR_CMD_INVALID   0x0BU /*< MFDFEVx Invalid Command Error. */
 MFDFEVx Command is received in a state where this command is not supported, or a totally unknown command is received.
 
#define PHAL_MFDFEVX_RESP_NACK0   0x00U /*< MFDFEVx NACK 0 (in ISO14443-3 mode). */
 
#define PHAL_MFDFEVX_RESP_NACK1   0x01U /*< MFDFEVx NACK 1 (in ISO14443-3 mode). */
 
#define PHAL_MFDFEVX_RESP_NACK4   0x04U /*< MFDFEVx NACK 4 (in ISO14443-3 mode). */
 
#define PHAL_MFDFEVX_RESP_NACK5   0x05U /*< MFDFEVx NACK 5 (in ISO14443-3 mode). */
 
#define PHAL_MFDFEVX_RESP_ACK_ISO3   0x0AU /*< MFDFEVx ACK (in ISO14443-3 mode). */
 
#define PHAL_MFDFEVX_RESP_ACK_ISO4   0x90U /*< MFDFEVx ACK (in ISO14443-4 mode). */
 
#define PHAL_MFDFEVX_RESP_ERR_AUTH   0x06U /*< MFDFEVx Authentication Error. */
 
#define PHAL_MFDFEVX_RESP_ERR_MAC_PCD   0x08U /*< MFDFEVx MAC Error. */
 
#define PHAL_MFDFEVX_RESP_ERR_BNR   0x09U /*< MFDFEVx Block number Error. */
 
#define PHAL_MFDFEVX_RESP_ERR_EXT   0x0AU /*< MFDFEVx Extension Error. */
 
#define PHAL_MFDFEVX_RESP_ERR_FORMAT   0x0CU /*< MFDFEVx Format Error. */
 
#define PHAL_MFDFEVX_RESP_ERR_GEN_FAILURE   0x0FU /*< MFDFEVx Generic Error. */
 

Macros for SDM functionality

#define PHAL_MFDFEVX_PICC_DATA   0x10U
 PICCDATA .
 
#define PHAL_MFDFEVX_MAC_DATA   0x08U
 MAC DATA.
 
#define PHAL_MFDFEVX_SESSION_ENC   0x01U
 Option to perform generate the SDM session encryption keys.
 
#define PHAL_MFDFEVX_SESSION_MAC   0x02U
 Option to perform generate the SDM session MAC keys.
 
#define PHAL_MFDFEVX_PLAIN_PICCDATA_MIRRIORING   0xE0U
 Option to indicate the presence of VCUID or RdCtr in the data.
 
#define PHAL_MFDFEVX_NO_PICCDATA_MIRRIORING   0xF0U
 Option to indicate the presence of Encrypted VCUID or RdCtr in the data.
 

MIFARE Plus Commands in MIFARE Plus Mode

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

MIFARE Plus Commands in MIFARE Mode

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

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. */
 

MIFARE NTAG 413 Native Commands

#define PHAL_MFPRIMENTAG_CMD_AUTHENTICATE_EV2_FIRST   0x71
 MFPRIMENTAG Authenticate Ev2 First command.
 
#define PHAL_MFPRIMENTAG_CMD_AUTHENTICATE_EV2_NON_FIRST   0x77
 MFPRIMENTAG Authenticate Ev2 Non First command.
 
#define PHAL_MFPRIMENTAG_CMD_CHANGE_KEY   0xC4
 MFPRIMENTAG Change key cmd.
 
#define PHAL_MFPRIMENTAG_CMD_GET_KEY_VERSION   0x64
 MFPRIMENTAG Get Key Version.
 
#define PHAL_MFPRIMENTAG_CMD_GET_VERSION   0x60
 MFPRIMENTAG Get Version cmd.
 
#define PHAL_MFPRIMENTAG_CMD_SET_CONFIG   0x5C
 MFPRIMENTAG Set Configuration Cmd.
 
#define PHAL_MFPRIMENTAG_CMD_GET_FILE_SETTINGS   0xF5
 MFPRIMENTAG Get File settings cmd.
 
#define PHAL_MFPRIMENTAG_CMD_GET_SDM_FILE_COUNTER   0xF6
 MFPRIMENTAG Get SDM Counter cmd.
 
#define PHAL_MFPRIMENTAG_CMD_CHANGE_FILE_SETTINGS   0x5F
 MFPRIMENTAG Change file settings cmd.
 
#define PHAL_MFPRIMENTAG_CMD_READ_DATA   0xBD
 MFPRIMENTAG Read Data cmd.
 
#define PHAL_MFPRIMENTAG_CMD_READ_DATA_ISO   0xAD
 MFPRIMENTAG Read Data cmd using ISO chaining.
 
#define PHAL_MFPRIMENTAG_CMD_WRITE_DATA   0x3D
 MFPRIMENTAG Write data cmd.
 
#define PHAL_MFPRIMENTAG_CMD_WRITE_DATA_ISO   0x8D
 MFPRIMENTAG Write data cmd using ISO chaining.
 
#define PHAL_MFPRIMENTAG_CMD_READ_SIG   0x3C
 MFPRIMENTAG Verify read signature command.
 

MIFARE NTAG 413 Response Codes

#define PHAL_MFPRIMENTAG_RESP_OPERATION_OK   0x00U
 MFPRIMENTAG Response - Successful operation.
 
#define PHAL_MFPRIMENTAG_RESP_OK   0x90U
 MFPRIMENTAG Response - Successful operation.
 
#define PHAL_MFPRIMENTAG_RESP_NO_CHANGES   0x0CU
 MFPRIMENTAG Response - No changes done to backup files.
 
#define PHAL_MFPRIMENTAG_RESP_ERR_NOT_SUP   0x0DU /*< MFPRIMENTAG Not Supported Error. */
 
#define PHAL_MFPRIMENTAG_RESP_ILLEGAL_COMMAND_CODE   0x1CU
 MFPRIMENTAG command code not supported.
 
#define PHAL_MFPRIMENTAG_RESP_ERR_INTEGRITY_ERROR   0x1EU
 MFPRIMENTAG CRC or MAC does not match data padding bytes not valid.
 
#define PHAL_MFPRIMENTAG_RESP_NO_SUCH_KEY   0x40U
 MFPRIMENTAG Invalid key number specified.
 
#define PHAL_MFPRIMENTAG_RESP_CHAINING   0x71U
 MFPRIMENTAG ISO Chaining Status.
 
#define PHAL_MFPRIMENTAG_RESP_ERR_LENGTH_ERROR   0x7EU
 MFPRIMENTAG Length of command string invalid.
 
#define PHAL_MFPRIMENTAG_RESP_PERMISSION_DENIED   0x9DU
 MFPRIMENTAG Current configuration/status does not allow the requested command.
 
#define PHAL_MFPRIMENTAG_RESP_ERR_PARAMETER_ERROR   0x9EU
 MFPRIMENTAG Value of params invalid.
 
#define PHAL_MFPRIMENTAG_RESP_ERR_AUTHENTICATION_ERROR   0xAEU
 MFPRIMENTAG Current authentication status does not allow the requested cmd.
 
#define PHAL_MFPRIMENTAG_RESP_ADDITIONAL_FRAME   0xAFU
 MFPRIMENTAG Additional data frame is expected to be sent.
 
#define PHAL_MFPRIMENTAG_RESP_ERR_BOUNDARY_ERROR   0xBEU
 MFPRIMENTAG Attempt to read/write data from/to beyond the files/record's limits.
 
#define PHAL_MFPRIMENTAG_RESP_ERR_COMMAND_ABORTED   0xCAU
 MFPRIMENTAG Previous cmd not fully completed. More...
 
#define PHAL_MFPRIMENTAG_RESP_ERR_FILE_NOT_FOUND   0xF0U
 MFPRIMENTAG Specified file number does not exist.
 

ISO 7816 Instructions

#define PHAL_MFPRIMENTAG_CMD_ISO7816_SELECT_FILE   0xA4
 ISO Select File.
 
#define PHAL_MFPRIMENTAG_CMD_ISO7816_READ_BINARY   0xB0
 ISO Read Binary.
 
#define PHAL_MFPRIMENTAG_CMD_ISO7816_UPDATE_BINARY   0xD6
 ISO UPDATE Binary.
 

MIFARE NTAG 413 specific defines

#define PHAL_MFPRIMENTAG_MAXWRAPPEDAPDU_SIZE   0x37u
 Maximum size of wrapped APDU 55 bytes.
 
#define PHAL_MFPRIMENTAG_MAXDFAPDU_SIZE   0x3Cu
 Maximum size of DESFire APDU 60 bytes.
 
#define PHAL_MFPRIMENTAG_DFAPPID_SIZE   0x03u
 Size of MFPRIMENTAG application Id.
 
#define PHAL_MFPRIMENTAG_DATA_BLOCK_SIZE   0x10u
 Data block size need for internal purposes.
 
#define PHAL_MFPRIMENTAG_MAX_FRAME_SIZE   0x40u
 Max size in a ISO 14443-4 frame.
 

ISO 7816 NTAG 413 return Codes

#define PHAL_MFPRIMENTAG_ISO7816_SUCCESS   0x9000U
 Correct execution.
 
#define PHAL_MFPRIMENTAG_ISO7816_ERR_WRONG_LENGTH   0x6700U
 Wrong length.
 
#define PHAL_MFPRIMENTAG_ISO7816_ERR_INVALID_APPLN   0x6A82U
 Application / file not found.
 
#define PHAL_MFPRIMENTAG_ISO7816_ERR_WRONG_PARAMS   0x6A86U
 Wrong parameters P1 and/or P2.
 
#define PHAL_MFPRIMENTAG_ISO7816_ERR_WRONG_LC   0x6A87U
 Lc inconsistent with P1/p2.
 
#define PHAL_MFPRIMENTAG_ISO7816_ERR_WRONG_LE   0x6C00U
 Wrong Le.
 
#define PHAL_MFPRIMENTAG_ISO7816_ERR_NO_PRECISE_DIAGNOSTICS   0x6F00U
 No precise diagnostics.
 
#define PHAL_MFPRIMENTAG_ISO7816_ERR_EOF_REACHED   0x6282U
 End of File reached.
 
#define PHAL_MFPRIMENTAG_ISO7816_ERR_FILE_ACCESS   0x6982U
 File access not allowed.
 
#define PHAL_MFPRIMENTAG_ISO7816_ERR_FILE_EMPTY   0x6985U
 File empty or access conditions not satisfied.
 
#define PHAL_MFPRIMENTAG_ISO7816_ERR_FILE_NOT_FOUND   0x6A82U
 File not found.
 
#define PHAL_MFPRIMENTAG_ISO7816_ERR_MEMORY_FAILURE   0x6581U
 Memory failure (unsuccessful update).
 
#define PHAL_MFPRIMENTAG_ISO7816_ERR_INCORRECT_PARAMS   0x6B00U
 Wrong parameter p1 or p2. More...
 
#define PHAL_MFPRIMENTAG_ISO7816_ERR_WRONG_CLA   0x6E00U
 Wrong Class byte.
 
#define PHAL_MFPRIMENTAG_ISO7816_ERR_UNSUPPORTED_INS   0x6D00U
 Instruction not supported.
 

Proximity Check return Codes

#define PHAL_MFPRIMENTAG_RESP_ERR_CMD_INVALID   0x0BU /*< MFPRIMENTAG Invalid Command Error. */
 
#define PHAL_MFPRIMENTAG_RESP_ERR_FORMAT   0x0CU /*< MFPRIMENTAG Format Error. */
 

RXTX settings for Rc663

#define PHHAL_HW_SAMAV2_RC663_RXTX_I14443A_106   0x00U
 ISO14443A Operating mode at 106kbit/s.
 
#define PHHAL_HW_SAMAV2_RC663_RXTX_I14443A_212   0x01U
 ISO14443A Operating mode at 212kbit/s.
 
#define PHHAL_HW_SAMAV2_RC663_RXTX_I14443A_424   0x02U
 ISO14443A Operating mode at 414kbit/s.
 
#define PHHAL_HW_SAMAV2_RC663_RXTX_I14443A_848   0x03U
 ISO14443A Operating mode at 848kbit/s.
 

Felica Command Codes

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

Flags

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

Values

#define PHPAL_FELICA_SW_IDMPMM_VALID   0x01U
 Stored UID is valid.
 
#define PHPAL_FELICA_SW_IDMPMM_INVALID   0x00U
 Stored UID is not valid.
 

Timing constants

#define PHPAL_FELICA_SW_TIME_T_US   302U
 
#define PHPAL_FELICA_SW_EXT_TIME_US   120U
 Time extension in microseconds for all commands. More...
 
#define PHPAL_FELICA_SW_RESP_TIME_A_US   (2417U + PHPAL_FELICA_SW_EXT_TIME_US)
 
#define PHPAL_FELICA_SW_RESP_TIME_B_US   1208U
 
#define PHPAL_FELICA_SW_RESP_TIME_B_US   1208U
 
#define PHPAL_FELICA_SW_SENSE_F_RESP_DURATION_212_US   944U
 
#define PHPAL_FELICA_SW_SENSE_F_RESP_DURATION_424_US   472U
 
#define PHPAL_FELICA_SW_TR1_DURATION_212_US   227U
 
#define PHPAL_FELICA_SW_TR1_DURATION_424_US   114U
 

Command Codes

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

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
 

Detailed Description

Private definitions and functions of all components.

Macro Definition Documentation

◆ PHAL_MFDFEVX_CMD_GET_KEY_SETTINGS

#define PHAL_MFDFEVX_CMD_GET_KEY_SETTINGS   0x45

MFDFEVx Get Key Settings command.


◆ PHAL_MFDFEVX_RESP_ERR_PICC_INTEGRITY

#define PHAL_MFDFEVX_RESP_ERR_PICC_INTEGRITY   0xC1U

MFDFEVx Unrecoverable error within PICC.

PICC will be disabled.

◆ PHAL_MFDFEVX_RESP_ERR_COMMAND_ABORTED

#define PHAL_MFDFEVX_RESP_ERR_COMMAND_ABORTED   0xCAU

MFDFEVx Previous command not fully completed.

Not all frames were requested or provided by the PCD.

◆ PHAL_MFDFEVX_RESP_ERR_COUNT

#define PHAL_MFDFEVX_RESP_ERR_COUNT   0xCEU

MFDFEVx Num.

of applns limited to 28. No additional applications possible.

◆ PHAL_MFDFEVX_RESP_ERR_FILE_INTEGRITY

#define PHAL_MFDFEVX_RESP_ERR_FILE_INTEGRITY   0xF1U

MFDFEVx Unrecoverable error within file.

File will be disabled.

◆ PHAL_MFDFEVX_RESP_ERR_CMD_ERR_FORMAT

#define PHAL_MFDFEVX_RESP_ERR_CMD_ERR_FORMAT   0x0CU

MFDFEVx Format of the command is not correct (e.g.

too many or too few bytes).

◆ PHAL_MFDFEVX_CMD_ISO7816_EXT_AUTHENTICATE

#define PHAL_MFDFEVX_CMD_ISO7816_EXT_AUTHENTICATE   0x82

ISO Ext.

Authenticate.

◆ PHAL_MFDFEVX_CMD_ISO7816_INT_AUTHENTICATE

#define PHAL_MFDFEVX_CMD_ISO7816_INT_AUTHENTICATE   0x88

ISO Int.

Authenticate.

◆ PHAL_MFDFEVX_ISO7816_ERR_INCORRECT_PARAMS

#define PHAL_MFDFEVX_ISO7816_ERR_INCORRECT_PARAMS   0x6B00U

Wrong parameter p1 or p2.

READ RECORDS.

◆ PHAL_MFPRIMENTAG_RESP_ERR_COMMAND_ABORTED

#define PHAL_MFPRIMENTAG_RESP_ERR_COMMAND_ABORTED   0xCAU

MFPRIMENTAG Previous cmd not fully completed.

Not all frames were requested or provided by the PCD.

◆ PHAL_MFPRIMENTAG_ISO7816_ERR_INCORRECT_PARAMS

#define PHAL_MFPRIMENTAG_ISO7816_ERR_INCORRECT_PARAMS   0x6B00U

Wrong parameter p1 or p2.

READ RECORDS.

◆ PHPAL_EPCUID_SW_BEGINROUND_DEAFTIME_ETU

#define PHPAL_EPCUID_SW_BEGINROUND_DEAFTIME_ETU   11U

Deaf time for BEGIN ROUND in ETUs.

deaf time = t5 + RSOF + some spare time. (= 11 ETUs) Note: This is needed to ignore Slot-F response if any.

◆ PHPAL_FELICA_SW_EXT_TIME_US

#define PHPAL_FELICA_SW_EXT_TIME_US   120U

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_EXT_TIME_US

#define PHPAL_I14443P3B_SW_EXT_TIME_US   60

Time extension in microseconds for all commands.


◆ PHPAL_I14443P4_EXT_TIME_US

#define PHPAL_I14443P4_EXT_TIME_US   60

Time extension in microseconds for all commands.


◆ PHPAL_I14443P4A_SW_EXT_TIME_US

#define PHPAL_I14443P4A_SW_EXT_TIME_US   60

Time extension in microseconds for all commands.


◆ 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_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.

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]pDataParams[In] Pointer to this layer's parameter structure.
[in]pRxData[In] Received data.
[in]wRxDataLength[In] Length of received data in bytes.
[in]bRxLastBits[In] Valid bits of last byte of RxData.

◆ 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]wNumBytesReceived[In] Number of bytes received from the card.
[in]bStatus[In] Status byte received from the card.
[in]bLayer4Comm[In] 0: 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]pPalMifareDataParams[In] Pointer to a palMifare component context.
[in]bLayer4Comm[In] 0: use ISO14443-3 protocol; 1: use ISO14443-4 protocol.
[in]wBlockNr[In] MIFARE Block number.
[in]pValue[In] Value (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]pPalMifareDataParams[In] Pointer to a palMifare component context.
[in]bLayer4Comm[In] 0: 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]pPalMifareDataParams[In] Pointer 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]pPalMifareDataParams[In] Pointer 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]pPalMifareDataParams[In] Pointer to a palMifare component context.
[in]bNumSteps[In] Number of steps for the PC (1..7).
[in]pRndC[In] RndC[7].
[out]pRndRC[Out] RndRC[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]pPalMifareDataParams[In] Pointer to a palMifare component context.
[in]bBlockNr[In] MIFARE Block number.
[in]bNumBlocks[In] Number of blocks to read (should not be more than 3).
[out]pBlocks[Out] Block(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]pPalMifareDataParams[In] Pointer to a palMifare component context.
[in]bBlockNr[In] MIFARE Block number.
[in]bNumBlocks[In] Number of blocks to write (should not be more than 3).
[in]pBlocks[In] Block(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]pValue[In] Value to be converted.
[in]bAddrData[In] bAddrData containing destination address.
[out]pBlock[Out] Formatted 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]pBlock[In] Formatted Value block.

◆ 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]pDataParams[In] Pointer to this layer's parameter structure.
[in]bLayer4Comm[In] 0: use ISO14443-3 protocol; 1: use ISO14443-4 protocol;
[in]bFirstAuth[In] 0: Following Authentication; 1: First Authentication;
[in]wBlockNr[In] Key Block number.
[in]wKeyNumber[In] Key Storage number.
[in]wKeyVersion[In] Key Storage version.
[in]bLenDivInput[In] Length of diversification input used to diversify the key. If 0, no diversification is performed.
[in]pDivInput[In] Diversification Input used to diversify the key.
[in]bUseKdfSl2[In] Indicates if a Key derivation for SL2 should be performed.
[in]bLenPcdCap2[In] Lengh of the supplied PCDCaps.
[in]pPcdCap2In[In] Pointer to PCDCaps (bLenPcdCap2 bytes), ignored if bLenPcdCap2 == 0.
[in]pPcdCap2Out[In] Pointer to PCDCaps sent from the card (6 bytes).
[out]pPdCap2[Out] Pointer 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]pDataParams[In] Pointer to this layer's parameter structure.
[in]bCmdCode[In] MIFARE Plus Command Code.
[in]wSrcBnr[In] Source Block number.
[in]wDstBnr[In] Destination Block number.
[in]pData[In] Payload data.
[in]wDataLength[In] Length of payload data.
[in]bEncrypted[In] indicates 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]bIsResponse[In] Whether this is a response or command or not.
[in]pTi[In] Transaction Identifier; uint8_t[4].
[in]wRCtr[In] R_CTR (read counter).
[in]wWCtr[In] W_CTR (write counter).
[out]pIv[Out] Initvector; 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]pDataParams[In] Pointer to this layer's parameter structure.
[in]pRndA[In] Pointer to RndA Buffer.
[in]pRndB[In] Pointer 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]pDataParams[In] Pointer to this layer's parameter structure.
[in]pRndA[In] Pointer to RndA Buffer.
[in]pRndB[In] Pointer 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]pMac[In] MAC; uint8_t[16].
[out]pTruncatedMac[Out] Truncated MAC; uint8_t[8].

◆ phbalReg_SerialWin_Int_SetMode()

phStatus_t phbalReg_SerialWin_Int_SetMode ( void *  phPort,
uint32_t  dwBitRate,
uint8_t  bStopBits,
uint8_t  bParity,
uint8_t  bDtr,
uint8_t  bRts 
)

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]phPort[In] handle to an open communication port
[in]dwBitRate[In] bit rate value in windows-style (like '115200', in decimal)
[in]bStopBits[In] number of stop bits
[in]bParity[In] parity
[in]bDtr[In] DTR Signal
[in]bRts[In] RTS Signal

◆ phbalReg_SerialWin_Int_SetTimeout()

phStatus_t phbalReg_SerialWin_Int_SetTimeout ( phbalReg_SerialWin_DataParams_t pDataParams)

Change reception timeout.

Applies new serial reception timeout

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

◆ phbalReg_SerialWin_Int_SetBitRate()

phStatus_t phbalReg_SerialWin_Int_SetBitRate ( void *  phPort,
uint32_t  dwBitRate 
)
Parameters
[in]phPort[In] handle to an open communication port
[in]dwBitRate[In] bit rate value in windows-style (like '115200', in decimal)

◆ phhalHw_SamAV2_Hc_AV1_Int_GenerateSessionKey()

phStatus_t phhalHw_SamAV2_Hc_AV1_Int_GenerateSessionKey ( uint8_t pKey,
uint16_t  keyType,
uint8_t pRndAData,
uint8_t pRndBData,
uint8_t pSessionKey 
)
Parameters
[in]pKey[In]the DES key
[in]keyType[In] the key type for the SamAV1 (DES, 3K3DES, AES128 or AES192)
[in]pRndAData[In] pointer to RndA data
[in]pRndBData[In] pointer to RndB data
[out]pSessionKey[Out] pointer to the Session Host key

◆ phhalHw_SamAV2_Hc_AV1_Int_EncodeVersionInDESKey()

phStatus_t phhalHw_SamAV2_Hc_AV1_Int_EncodeVersionInDESKey ( uint8_t pKey,
uint8_t  KeyVersion,
uint8_t  round,
uint8_t pEncodedKey 
)

Encode the KeyVersion in a DES or 3KDES.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETEROperation aborted.
OtherDepending on implementation and underlaying component.
Parameters
[in]pKey[In] pointer to the key to encode
[in]KeyVersion[In] KeyVersion used for encoding
[in]round[In] number of block(8bytes) to encode
[out]pEncodedKey[Out] pointer to the encoded key

◆ phhalHw_SamAV2_Hc_AV2_Int_GenerateAuthEncKey()

phStatus_t phhalHw_SamAV2_Hc_AV2_Int_GenerateAuthEncKey ( phhalHw_SamAV2_DataParams_t pDataParams,
uint8_t  keyType,
uint8_t pRnd1Data,
uint8_t pRnd2Data,
uint8_t pSessionKey,
uint8_t pKeyLength 
)
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]keyType[In] the key type for the SamAV1 (DES, 3K3DES, AES128 or AES192)
[in]pRnd1Data[In] pointer to RndA data
[in]pRnd2Data[In] pointer to RndB data
[out]pSessionKey[Out] pointer to the Session Host key
[out]pKeyLength[Out] length of the Session Host key

◆ phhalHw_SamAV2_Hc_AV2_Int_GenerateSessionKey()

phStatus_t phhalHw_SamAV2_Hc_AV2_Int_GenerateSessionKey ( phhalHw_SamAV2_DataParams_t pDataParams,
uint8_t  keyType,
uint8_t pRndAData,
uint8_t pRndBData,
uint8_t pEncSessionKey,
uint8_t pMacSessionKey,
uint8_t pKeyLength 
)
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]keyType[In] the key type for the SamAV1 (DES, 3K3DES, AES128 or AES192)
[in]pRndAData[In] pointer to RndA data
[in]pRndBData[In] pointer to RndB data
[out]pEncSessionKey[Out] pointer to the ENC Session Host key
[out]pMacSessionKey[Out] pointer to the MAC Session Host key
[out]pKeyLength[Out] length of the Session Host key

◆ phhalHw_SamAV2_UpdateLc()

phStatus_t phhalHw_SamAV2_UpdateLc ( phhalHw_SamAV2_DataParams_t pDataParams)

Update LC byte according to data already available in Buffer.

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

◆ phhalHw_SamAV2_UpdateP2()

phStatus_t phhalHw_SamAV2_UpdateP2 ( phhalHw_SamAV2_DataParams_t pDataParams,
uint8_t  p2 
)

Update P1byte according to data already available in Buffer.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]p2[In] Value for P1.

◆ phhalHw_SamAV2_Rc663_SetCardMode()

phStatus_t phhalHw_SamAV2_Rc663_SetCardMode ( phhalHw_SamAV2_DataParams_t pDataParams,
uint16_t  wTxDataRate,
uint16_t  wRxDataRate 
)

Apply card mode according to given parameters.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wTxDataRate[In] TxDataRate HAL config.
[in]wRxDataRate[In] RxDataRate HAL config.

◆ phhalHw_SamAV2_Rc523_SetConfig()

phStatus_t phhalHw_SamAV2_Rc523_SetConfig ( phhalHw_SamAV2_DataParams_t pDataParams,
uint16_t  wConfig,
uint16_t  wValue 
)

Set configuration parameter.

Rc523 Specific

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_UNSUPPORTED_PARAMETERConfiguration is not supported or invalid.
PH_ERR_INVALID_PARAMETERParameter value is invalid.
PH_ERR_PARAMETER_OVERFLOWSetting the parameter value would lead to an overflow.
PH_ERR_INTERFACE_ERRORCommunication error.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wConfig[In] Configuration Identifier.
[in]wValue[In] Configuration Value.

◆ phhalHw_SamAV2_Rc523_Wait()

phStatus_t phhalHw_SamAV2_Rc523_Wait ( phhalHw_SamAV2_DataParams_t pDataParams,
uint8_t  bUnit,
uint16_t  wTimeout 
)

Blocks until the time given by wTimeout elapsed.

Rc523 Specific

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETERbUnit is invalid.
PH_ERR_INTERFACE_ERRORCommunication error.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bUnit[In] Unit of given timeout value (either PHHAL_HW_TIME_MICROSECONDS or PHHAL_HW_TIME_MILLISECONDS).
[in]wTimeout[In] Timeout value.

◆ phhalHw_SamAV2_Rc523_SetFdt()

phStatus_t phhalHw_SamAV2_Rc523_SetFdt ( phhalHw_SamAV2_DataParams_t pDataParams,
uint8_t  bUnit,
uint16_t  wTimeout 
)

Sets the Frame Delay Time (Timeout).

Rc523 Specific Note: Frame Delay Time is defined between the last transmitted bit and the first received bit.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bUnit[In] Unit of given timeout value (either PHHAL_HW_TIME_MICROSECONDS or PHHAL_HW_TIME_MILLISECONDS).
[in]wTimeout[In] Timeout value.

◆ phhalHw_SamAV2_Rc523_GetFdt()

phStatus_t phhalHw_SamAV2_Rc523_GetFdt ( phhalHw_SamAV2_DataParams_t pDataParams,
uint32_t pTime 
)

Retrieves the Frame Delay Time of the last command.

Rc523 Specific Note: Frame Delay Time is defined between the last transmitted bit and the first received bit.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[out]pTime[Out] Calculated time in microseconds from timer contents.

◆ phhalHw_SamAV2_Rc663_SetConfig()

phStatus_t phhalHw_SamAV2_Rc663_SetConfig ( phhalHw_SamAV2_DataParams_t pDataParams,
uint16_t  wConfig,
uint16_t  wValue 
)

Set configuration parameter.

Rc663 Specific

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_UNSUPPORTED_PARAMETERConfiguration is not supported or invalid.
PH_ERR_INVALID_PARAMETERParameter value is invalid.
PH_ERR_PARAMETER_OVERFLOWSetting the parameter value would lead to an overflow.
PH_ERR_INTERFACE_ERRORCommunication error.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wConfig[In] Configuration Identifier.
[in]wValue[In] Configuration Value.

◆ phhalHw_SamAV2_Rc663_Wait()

phStatus_t phhalHw_SamAV2_Rc663_Wait ( phhalHw_SamAV2_DataParams_t pDataParams,
uint8_t  bUnit,
uint16_t  wTimeout 
)

Blocks until the time given by wTimeout elapsed.

Rc663 Specific

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETERbUnit is invalid.
PH_ERR_INTERFACE_ERRORCommunication error.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bUnit[In] Unit of given timeout value (either PHHAL_HW_TIME_MICROSECONDS or PHHAL_HW_TIME_MILLISECONDS).
[in]wTimeout[In] Timeout value.

◆ phhalHw_SamAV2_Rc663_SetRxWait()

phStatus_t phhalHw_SamAV2_Rc663_SetRxWait ( phhalHw_SamAV2_DataParams_t pDataParams,
uint16_t  wTimeEtu 
)

Sets the RxWait time.

Rc663 Specific Note: RxWait is defined between the last transmitted bit and the activation of the receiver.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wTimeEtu[In] RxWait time in ETUs.

◆ phhalHw_SamAV2_Rc663_SetTxWait()

phStatus_t phhalHw_SamAV2_Rc663_SetTxWait ( phhalHw_SamAV2_DataParams_t pDataParams,
uint16_t  wTimeUs 
)

Sets the TxWait time in microseconds.

Rc663 Specific Note: TxWait is defined between the last received bit and the next transmitted bit.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wTimeUs[In] TxWait time in microseconds.

◆ phhalHw_SamAV2_Rc663_SetFdt()

phStatus_t phhalHw_SamAV2_Rc663_SetFdt ( phhalHw_SamAV2_DataParams_t pDataParams,
uint8_t  bUnit,
uint16_t  wTimeout 
)

Sets the Frame Delay Time (Timeout).

Rc663 Specific Note: Frame Delay Time is defined between the last transmitted bit and the first received bit.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bUnit[In] Unit of given timeout value (either PHHAL_HW_TIME_MICROSECONDS or PHHAL_HW_TIME_MILLISECONDS).
[in]wTimeout[In] Timeout value.

◆ phhalHw_SamAV2_Rc663_GetFdt()

phStatus_t phhalHw_SamAV2_Rc663_GetFdt ( phhalHw_SamAV2_DataParams_t pDataParams,
phStatus_t  wExchangeStatus,
uint32_t pTime 
)

Retrieves the Frame Delay Time of the last command.

Rc663 Specific Note: Frame Delay Time is defined between the last transmitted bit and the first received bit.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wExchangeStatus[In] Status code returned by exchange function.
[out]pTime[Out] Calculated time in microseconds from timer contents.

◆ phhalHw_SamAV2_Rc663_GetDigiDelay()

phStatus_t phhalHw_SamAV2_Rc663_GetDigiDelay ( phhalHw_SamAV2_DataParams_t pDataParams,
uint8_t  bIsTimeout,
uint16_t pDelayUs 
)

Returns the delay of the digital circutry for the current protocol.

Rc663 Specific

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bIsTimeout[In] Wheter the returned delay is added to a timeout (PH_ON) or is used for measurement (PH_OFF).
[out]pDelayUs[Out] The digital delay in microseconds.

◆ phhalHw_SamAV3_Rc523_SetConfig()

phStatus_t phhalHw_SamAV3_Rc523_SetConfig ( phhalHw_SamAV3_DataParams_t pDataParams,
uint16_t  wConfig,
uint16_t  wValue 
)

Set configuration parameter.

Rc523 Specific

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_UNSUPPORTED_PARAMETERConfiguration is not supported or invalid.
PH_ERR_INVALID_PARAMETERParameter value is invalid.
PH_ERR_PARAMETER_OVERFLOWSetting the parameter value would lead to an overflow.
PH_ERR_INTERFACE_ERRORCommunication error.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wConfig[In] Configuration Identifier.
[in]wValue[In] Configuration Value.

◆ phhalHw_SamAV3_Rc523_Wait()

phStatus_t phhalHw_SamAV3_Rc523_Wait ( phhalHw_SamAV3_DataParams_t pDataParams,
uint8_t  bUnit,
uint16_t  wTimeout 
)

Blocks until the time given by wTimeout elapsed.

Rc523 Specific

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETERbUnit is invalid.
PH_ERR_INTERFACE_ERRORCommunication error.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bUnit[In] Unit of given timeout value (either PHHAL_HW_TIME_MICROSECONDS or PHHAL_HW_TIME_MILLISECONDS).
[in]wTimeout[In] Timeout value.

◆ phhalHw_SamAV3_Rc523_SetFdt()

phStatus_t phhalHw_SamAV3_Rc523_SetFdt ( phhalHw_SamAV3_DataParams_t pDataParams,
uint8_t  bUnit,
uint16_t  wTimeout 
)

Sets the Frame Delay Time (Timeout).

Rc523 Specific Note: Frame Delay Time is defined between the last transmitted bit and the first received bit.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bUnit[In] Unit of given timeout value (either PHHAL_HW_TIME_MICROSECONDS or PHHAL_HW_TIME_MILLISECONDS).
[in]wTimeout[In] Timeout value.

◆ phhalHw_SamAV3_Rc523_GetFdt()

phStatus_t phhalHw_SamAV3_Rc523_GetFdt ( phhalHw_SamAV3_DataParams_t pDataParams,
uint32_t pTime 
)

Retrieves the Frame Delay Time of the last command.

Rc523 Specific Note: Frame Delay Time is defined between the last transmitted bit and the first received bit.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[out]pTime[Out] Calculated time in microseconds from timer contents.

◆ phhalHw_SamAV3_Rc663_SetCardMode()

phStatus_t phhalHw_SamAV3_Rc663_SetCardMode ( phhalHw_SamAV3_DataParams_t pDataParams,
uint16_t  wTxDataRate,
uint16_t  wRxDataRate 
)

Apply card mode according to given parameters.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wTxDataRate[In] TxDataRate HAL config.
[in]wRxDataRate[In] RxDataRate HAL config.

◆ phhalHw_SamAV3_Rc663_SetConfig()

phStatus_t phhalHw_SamAV3_Rc663_SetConfig ( phhalHw_SamAV3_DataParams_t pDataParams,
uint16_t  wConfig,
uint16_t  wValue 
)

Set configuration parameter.

Rc663 Specific

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_UNSUPPORTED_PARAMETERConfiguration is not supported or invalid.
PH_ERR_INVALID_PARAMETERParameter value is invalid.
PH_ERR_PARAMETER_OVERFLOWSetting the parameter value would lead to an overflow.
PH_ERR_INTERFACE_ERRORCommunication error.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wConfig[In] Configuration Identifier.
[in]wValue[In] Configuration Value.

◆ phhalHw_SamAV3_Rc663_Wait()

phStatus_t phhalHw_SamAV3_Rc663_Wait ( phhalHw_SamAV3_DataParams_t pDataParams,
uint8_t  bUnit,
uint16_t  wTimeout 
)

Blocks until the time given by wTimeout elapsed.

Rc663 Specific

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETERbUnit is invalid.
PH_ERR_INTERFACE_ERRORCommunication error.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bUnit[In] Unit of given timeout value (either PHHAL_HW_TIME_MICROSECONDS or PHHAL_HW_TIME_MILLISECONDS).
[in]wTimeout[In] Timeout value.

◆ phhalHw_SamAV3_Rc663_SetRxWait()

phStatus_t phhalHw_SamAV3_Rc663_SetRxWait ( phhalHw_SamAV3_DataParams_t pDataParams,
uint16_t  wTimeEtu 
)

Sets the RxWait time.

Rc663 Specific Note: RxWait is defined between the last transmitted bit and the activation of the receiver.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wTimeEtu[In] RxWait time in ETUs.

◆ phhalHw_SamAV3_Rc663_SetTxWait()

phStatus_t phhalHw_SamAV3_Rc663_SetTxWait ( phhalHw_SamAV3_DataParams_t pDataParams,
uint16_t  wTimeUs 
)

Sets the TxWait time in microseconds.

Rc663 Specific Note: TxWait is defined between the last received bit and the next transmitted bit.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wTimeUs[In] TxWait time in microseconds.

◆ phhalHw_SamAV3_Rc663_SetFdt()

phStatus_t phhalHw_SamAV3_Rc663_SetFdt ( phhalHw_SamAV3_DataParams_t pDataParams,
uint8_t  bUnit,
uint16_t  wTimeout 
)

Sets the Frame Delay Time (Timeout).

Rc663 Specific Note: Frame Delay Time is defined between the last transmitted bit and the first received bit.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bUnit[In] Unit of given timeout value (either PHHAL_HW_TIME_MICROSECONDS or PHHAL_HW_TIME_MILLISECONDS).
[in]wTimeout[In] Timeout value.

◆ phhalHw_SamAV3_Rc663_GetFdt()

phStatus_t phhalHw_SamAV3_Rc663_GetFdt ( phhalHw_SamAV3_DataParams_t pDataParams,
phStatus_t  wExchangeStatus,
uint32_t pTime 
)

Retrieves the Frame Delay Time of the last command.

Rc663 Specific Note: Frame Delay Time is defined between the last transmitted bit and the first received bit.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wExchangeStatus[In] Status code returned by exchange function.
[out]pTime[Out] Calculated time in microseconds from timer contents.

◆ phhalHw_SamAV3_Rc663_GetDigiDelay()

phStatus_t phhalHw_SamAV3_Rc663_GetDigiDelay ( phhalHw_SamAV3_DataParams_t pDataParams,
uint8_t  bIsTimeout,
uint16_t pDelayUs 
)

Returns the delay of the digital circutry for the current protocol.

Rc663 Specific

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bIsTimeout[In] Wheter the returned delay is added to a timeout (PH_ON) or is used for measurement (PH_OFF).
[out]pDelayUs[Out] The digital delay in microseconds.

◆ phKeyStore_SamAV2_Int_GetKeyEntry()

phStatus_t phKeyStore_SamAV2_Int_GetKeyEntry ( phKeyStore_SamAV2_DataParams_t pDataParams,
uint8_t  bKeyNumber,
phKeyStore_SamAV2_KeyEntry_t pKeyEntry 
)
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bKeyNumber[In] number of the key entry to be returned (00h to 7Fh)
[out]pKeyEntry[Out] Key entry structure array containing Key Entry

◆ phKeyStore_SamAV2_Int_ConvertKeyEntryToBuffer()

phStatus_t phKeyStore_SamAV2_Int_ConvertKeyEntryToBuffer ( phKeyStore_SamAV2_KeyEntry_t pKeyEntry,
uint8_t pKeyA,
uint8_t pKeyB,
uint8_t pKeyC,
uint8_t pKeyEntryBuffer 
)
Parameters
[in]pKeyEntry[In] Pointer to the KeyStore KeyEntry structure.
[in]pKeyA[In] Pointer to KeyA .
[in]pKeyB[In] Pointer to KeyB .
[in]pKeyC[In] Pointer to KeyC .
[out]pKeyEntryBuffer[Out] Pointer to the key buffer .

◆ phLog_GetRegisteredEntry()

phLog_RegisterEntry_t* phLog_GetRegisteredEntry ( void *  pDataParams)

Retreive phLog_RegisterEntry_t corresponding to given DataParams pointer.

Parameters
[in]pDataParams[In] The 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]pDataParams[In] The DataParams of the calling function.
[in]bLogType[In] Type of Entry (one of the PH_LOG_LOGTYPE_* values).
[in]pName[In] The Null-terminated name of the parameter.
[in]pParam[In] Pointer to the memory where the parameter resides.
[in]wLength[In] The length in bytes to the supplied buffer.
[in]bDataType[In] Indicates the value type (either PH_LOG_DATATYPE_BUFFER or PH_LOG_DATATYPE_VALUE).

◆ phpalEpcUid_Sw_ParseResponse()

phStatus_t phpalEpcUid_Sw_ParseResponse ( phpalEpcUid_Sw_DataParams_t pDataParams,
uint8_t pRxBuffer,
uint16_t  wRxLength 
)

Parse EPC/UID response after BeginRound / CloseSlot Command.

Fills either phpalEpcUid_Sw_DataParams_t::bEpc or phpalEpcUid_Sw_DataParams_t::bIdd.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_PROTOCOL_ERRORInvalid response.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]pRxBuffer[In] Data returned by the tag.
[in]wRxLength[In] Length of the received data.

◆ 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]pDataParams[In] Pointer to this layer's parameter structure.
[in]bReqCode[In] request code according to ISO14443-3A.
[out]pAtqa[Out] AtqA; 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]pDataParams[In] Pointer to this layers parameter structure.
[in]bIsWakeUp[In] Performs ReqB if bIsWakeUp=0 and WupB if bIsWakeUp=1.
[in]bNumSlots[In] Number of slots.
[in]bAfi[In] AFI; Application Family Indentifier.
[in]bExtAtqb[In] Enable Extended AtqB.
[out]pAtqb[Out] AtqB; uint8_t[13].
[out]pAtqbLen[Out] Length 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]bCidEnabled[In] Set to != 0 to enable CID byte
[in]bCid[In] CID byte
[in]bNadEnabled[In] Set to != 0 to enable NAD byte
[in]bNad[In] NAD byte
[in]bPcbBlockNum[In] PCB block number bit
[in]bChaining[In] Set to != 0 if chaining bit should be set
[out]pTxBuffer[Out] transmit buffer
[out]pTxLength[Out] number 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]bCidEnabled[In] Set to != 0 to enable CID byte
[in]bCid[In] CID byte
[in]bPcbBlockNum[In] PCB block number bit
[in]bIsAck[In] Set to != 0 if an ACK should be generated
[out]pTxBuffer[Out] transmit buffer
[out]pTxLength[Out] number 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]bCidEnabled[In] Set to != 0 to enable CID byte
[in]bCid[In] CID byte
[in]bIsWtx[In] Set to != 0 if a WTX frame should be generated
[in]bWtxm[In] WTXM bits, used if /ref bIsWtx is set
[out]pTxBuffer[Out] transmit buffer
[out]pTxLength[Out] number of bytes to send

◆ phpalI14443p4_Sw_Int_BuildSParamBlock()

phStatus_t phpalI14443p4_Sw_Int_BuildSParamBlock ( uint8_t  bCidEnabled,
uint8_t  bCid,
uint8_t pTxBuffer,
uint16_t pTxLength 
)

Build S-Param Block frames.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]bCidEnabled[In] Set to != 0 to enable CID byte
[in]bCid[In] CID byte
[out]pTxBuffer[Out] transmit buffer
[out]pTxLength[Out] number 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]bCheckCid[In] Set to != 0 to enable CID check
[in]bCid[In] Current CID for comparison
[in]bCheckNad[In] Set to != 0 to enable NAD check
[in]bNad[In] Current NAD for comparison
[in]pRxBuffer[In] Received data
[in]wRxLength[In] Number 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]bCheckCid[In] Set to != 0 to enable CID check
[in]bCid[In] Current CID for comparison
[in]pRxBuffer[In] Received data
[in]wRxLength[In] Number 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]bCheckCid[In] Set to != 0 to enable CID check
[in]bCid[In] Current CID for comparison
[in]pRxBuffer[In] Received data
[in]wRxLength[In] Number 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]pDataParams[In] Pointer to this layer's parameter structure.
[in]wOption[In] option parameter.
[in]bRetryCount[In] number of already performed retries.
[in]pTxBuffer[In] data to transmit
[in]wTxLength[In] length of input data
[out]ppRxBuffer[Out] Pointer to received data
[in]pRxLength[In] Received data bytes

◆ phpalI14443p4_Sw_Int_ExchangeSParamFrame()

phStatus_t phpalI14443p4_Sw_Int_ExchangeSParamFrame ( phpalI14443p4_Sw_DataParams_t pDataParams,
uint8_t pDataIn,
uint16_t  wDataInLength,
uint8_t pDataOut,
uint16_t  wDataOutSize,
uint16_t pwDataOutLength 
)

Perform an exchange of an S(param) frame and take care about error handling etc.

Checks response and performs retries if neecessary.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]pDataIn[In] data that should be send to the PICC
[in]wDataInLength[In] length of data
[out]pDataOut[Out] buffer to store the data returned from the PICC
[in]wDataOutSize[In] Size of the return buffer
[out]pwDataOutLength[Out] number of bytes returned

◆ phpalI14443p4_Sw_Int_Parse_TLV_Len()

phStatus_t phpalI14443p4_Sw_Int_Parse_TLV_Len ( uint8_t pData,
uint16_t  wDataLen,
uint16_t  wLengthOffset,
uint32_t pdwLengthValue,
uint16_t pwLengthLength 
)

Parse the length of an TLV object.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pData[In] Data to be parsed.
[in]wDataLen[In] Length of the data to be parsed.
[in]wLengthOffset[In] Offset where the length intication should be start.
[out]pdwLengthValue[Out] The parsed length
[out]pwLengthLength[Out] The length of the length element

◆ phpalI14443p4_Sw_Int_Attach_TLV_Header()

phStatus_t phpalI14443p4_Sw_Int_Attach_TLV_Header ( uint8_t pData,
uint32_t  wDataLen,
uint32_t  wDataOffset,
uint8_t  bTag,
uint16_t pwDataWritten 
)

Attache the tag and the length object before the data.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pData[In] Buffer where the data is written and the header should be written.
[in]wDataLen[In] length of the data.
[in]wDataOffset[In] Offset where the data is located.
[in]bTag[In] Tag that should be used
[out]pwDataWritten[Out] Number of bytes used for the header.

◆ phpalI14443p4_Sw_Int_SParamCheckSuppliedParameter()

phStatus_t phpalI14443p4_Sw_Int_SParamCheckSuppliedParameter ( phpalI14443p4_Sw_DataParams_t pDataParams,
phpalI14443p4_Sw_SParam_Param *  pParameter 
)

Check the supplied parameters of an S(PARAM) request.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]pParameter[In] Pointer to the struct with the supplied values.

◆ phpalI14443p4_Sw_Int_SParamExtractIndicatedParam()

phStatus_t phpalI14443p4_Sw_Int_SParamExtractIndicatedParam ( phpalI14443p4_Sw_DataParams_t pDataParams,
phpalI14443p4_Sw_SParam_Param *  pParameter,
uint8_t pbSParamDataBuffer,
uint16_t  wSParamDataLen,
uint8_t  bBitRateIndicationSupported,
uint8_t  bFrameFormatIndicationSupported 
)

Extract the indicated data of an S(PARAM) indication.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[out]pParameter[Out] Pointer to the struct with the supplied values.
[in]pbSParamDataBuffer[In] Buffer containing the returned values from the S(Param) request
[in]wSParamDataLen[In] Length of the returned data
[in]bBitRateIndicationSupported[In] PH_ON if BitRate Indication should be checked
[in]bFrameFormatIndicationSupported[In] PH_ON if FrameFormat Indication should be checked

◆ phpalI14443p4_Sw_Int_SParamCheckSuppliedParameterAreSupported()

phStatus_t phpalI14443p4_Sw_Int_SParamCheckSuppliedParameterAreSupported ( phpalI14443p4_Sw_SParam_Param *  pParameter)

Check if the supplied parameter are supported by the indicated parameter an S(PARAM) indication.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pParameter[In] Pointer to the struct with the supplied values.

◆ phpalI14443p4_Sw_Int_SParamGetAutoParameter()

phStatus_t phpalI14443p4_Sw_Int_SParamGetAutoParameter ( phpalI14443p4_Sw_DataParams_t pDataParams,
phpalI14443p4_Sw_SParam_Param *  pParameter 
)

Automaticly gets the 'best' parameter for the S(Param) activation form the S(PARAM) indication.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]pParameter[In] Pointer to the struct with the supplied values.

◆ phpalI14443p4_Sw_Int_SParamBuildActivateData()

phStatus_t phpalI14443p4_Sw_Int_SParamBuildActivateData ( phpalI14443p4_Sw_DataParams_t pDataParams,
phpalI14443p4_Sw_SParam_Param *  pParameter,
uint8_t pbSParamDataBuffer,
uint16_t  wSParamDataSize,
uint16_t pwSParamDataStartPos,
uint8_t  bBitRateIndicationSupported,
uint8_t  bFrameFormatIndicationSupported 
)

Build the S(Param) activation command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]pParameter[In] Pointer to the struct with the supplied values.
[out]pbSParamDataBuffer[Out] Buffer where the generated activation is written
[in]wSParamDataSize[In] Size of the Buffer
[out]pwSParamDataStartPos[Out] Start index of the generated data within the array
[in]bBitRateIndicationSupported[In] PH_ON if BitRate Indication should be checked
[in]bFrameFormatIndicationSupported[In] PH_ON if FrameFormat Indication should be checked

◆ phpalI14443p4_Sw_Int_SParamApplyParameter()

phStatus_t phpalI14443p4_Sw_Int_SParamApplyParameter ( phpalI14443p4_Sw_DataParams_t pDataParams,
phpalI14443p4_Sw_SParam_Param *  pParameter 
)

Applies the activated parameters to the hardware.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]pParameter[In] Pointer to the struct with the supplied values.

◆ phpalI14443p4_Sw_Int_VHBR_Exchange()

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

Perform Data Exchange with Picc.

If FWEC is enabled the frame will coded to FWEC

wOption can be one of:

wOption can be combined with:

Component : Rc523 Special Behaviour:
If PHHAL_HW_CARDTYPE_I18092MPT is chosen, Exchange performs the reception BEFORE the transmission.
For details refer to Component : Rc523.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETERwOption is invalid.
PH_ERR_SUCCESS_INCOMPLETE_BYTEOperation successful, incomplete byte received; Retrieve number of valid bits of last byte with PHHAL_HW_CONFIG_RXLASTBITS.
PH_ERR_IO_TIMEOUTNo response detected within the configured time frame.
PH_ERR_INTEGRITY_ERRORResponse received but CRC or Parity is invalid.
PH_ERR_COLLISION_ERRORResponse received but a collision occured; Retrieve number of valid bits of last byte with PHHAL_HW_CONFIG_RXLASTBITS.
PH_ERR_BUFFER_OVERFLOWInternal receive buffer is too small for transmission or smaller than the response.
PH_ERR_FRAMING_ERRORFrame format is either invalid for configured protocol or corrupted.
PH_ERR_PROTOCOL_ERRORFrame format is definitely invalid for configured protocol.
PH_ERR_READ_WRITE_ERRORHardware problem.
PH_ERR_TEMPERATURE_ERRORHardware problem.
PH_ERR_RF_ERRORHardware problem.
PH_ERR_INTERFACE_ERRORHardware problem.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wOption[In] Option parameter.
[in]pTxBuffer[In] Data to transmit.
[in]wTxLength[In] Number of bytes to transmit.
[out]ppRxBuffer[Out] Pointer to received data.
[out]pRxLength[Out] Number of received data bytes.

◆ phpalI14443p4_Sw_Int_VHBR_GetRxTxBufferSize()

phStatus_t phpalI14443p4_Sw_Int_VHBR_GetRxTxBufferSize ( phpalI14443p4_Sw_DataParams_t pDataParams,
uint16_t pwRxBufferSize,
uint16_t pwTxBufferSize 
)

Get the max possible buffer size for Rx and Tx buffer possible with current config and reader.

If FWEC is enabled the buffer size if the FWEC Buffer is used

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_UNSUPPORTED_PARAMETERConfiguration is not supported or invalid.
PH_ERR_INVALID_PARAMETERParameter value is invalid.
PH_ERR_PARAMETER_OVERFLOWSetting the parameter value would lead to an overflow.
PH_ERR_INTERFACE_ERRORCommunication error.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[out]pwRxBufferSize[Out] RxBufferSize.
[out]pwTxBufferSize[Out] TxBufferSize.

◆ phpalI14443p4_Sw_Int_VHBR_GetNumberOfPreloadedBytes()

phStatus_t phpalI14443p4_Sw_Int_VHBR_GetNumberOfPreloadedBytes ( phpalI14443p4_Sw_DataParams_t pDataParams,
uint16_t pwNumberPreloadedBytes 
)

Get the number of preloaded bytes (either in FWEC buffer or in reader buffer)

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_UNSUPPORTED_PARAMETERConfiguration is not supported or invalid.
PH_ERR_INVALID_PARAMETERParameter value is invalid.
PH_ERR_PARAMETER_OVERFLOWSetting the parameter value would lead to an overflow.
PH_ERR_INTERFACE_ERRORCommunication error.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[out]pwNumberPreloadedBytes[Out] Number preloaded bytes.

◆ phpalI14443p4_Sw_Int_VHBR_GetTxPCB()

phStatus_t phpalI14443p4_Sw_Int_VHBR_GetTxPCB ( phpalI14443p4_Sw_DataParams_t pDataParams,
uint16_t pwPCB 
)

Get the stored PCB byte.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_UNSUPPORTED_PARAMETERConfiguration is not supported or invalid.
PH_ERR_INVALID_PARAMETERParameter value is invalid.
PH_ERR_PARAMETER_OVERFLOWSetting the parameter value would lead to an overflow.
PH_ERR_INTERFACE_ERRORCommunication error.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[out]pwPCB[Out] PCB byte.

◆ phpalI14443p4_Sw_Int_VHBR_SetTxPCB()

phStatus_t phpalI14443p4_Sw_Int_VHBR_SetTxPCB ( phpalI14443p4_Sw_DataParams_t pDataParams,
uint8_t  bPCB 
)

Change the stored PCB byte.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_UNSUPPORTED_PARAMETERConfiguration is not supported or invalid.
PH_ERR_INVALID_PARAMETERParameter value is invalid.
PH_ERR_PARAMETER_OVERFLOWSetting the parameter value would lead to an overflow.
PH_ERR_INTERFACE_ERRORCommunication error.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bPCB[In] PCB byte.

◆ phpalI14443p4_Sw_Int_VHBR_SetTxBufferLen()

phStatus_t phpalI14443p4_Sw_Int_VHBR_SetTxBufferLen ( phpalI14443p4_Sw_DataParams_t pDataParams,
uint16_t  wTxBufferLen 
)

Change the TxBufferLen.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_UNSUPPORTED_PARAMETERConfiguration is not supported or invalid.
PH_ERR_INVALID_PARAMETERParameter value is invalid.
PH_ERR_PARAMETER_OVERFLOWSetting the parameter value would lead to an overflow.
PH_ERR_INTERFACE_ERRORCommunication error.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wTxBufferLen[In] TxBufferLen.

◆ phpalI14443p4_Sw_Int_VHBR_SetRxBufferStartPos()

phStatus_t phpalI14443p4_Sw_Int_VHBR_SetRxBufferStartPos ( phpalI14443p4_Sw_DataParams_t pDataParams,
uint16_t  wRxBufferStartPos 
)

Change Rx Buffer Start Pos.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_UNSUPPORTED_PARAMETERConfiguration is not supported or invalid.
PH_ERR_INVALID_PARAMETERParameter value is invalid.
PH_ERR_PARAMETER_OVERFLOWSetting the parameter value would lead to an overflow.
PH_ERR_INTERFACE_ERRORCommunication error.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wRxBufferStartPos[In] RxBufferStartPos.

◆ phpalI14443p4_Sw_Int_VHBR_GetRxBufferStartPos()

phStatus_t phpalI14443p4_Sw_Int_VHBR_GetRxBufferStartPos ( phpalI14443p4_Sw_DataParams_t pDataParams,
uint16_t pwRxBufferStartPos 
)

Get Rx Buffer Start Pos.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_UNSUPPORTED_PARAMETERConfiguration is not supported or invalid.
PH_ERR_INVALID_PARAMETERParameter value is invalid.
PH_ERR_PARAMETER_OVERFLOWSetting the parameter value would lead to an overflow.
PH_ERR_INTERFACE_ERRORCommunication error.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[out]pwRxBufferStartPos[Out] RxBufferStartPos.

◆ phpalI14443p4_Sw_Int_VHBR_FormatBlockFWEC()

phStatus_t phpalI14443p4_Sw_Int_VHBR_FormatBlockFWEC ( uint8_t pTxBuffer,
uint16_t  wTxSize,
uint16_t  wTxLen,
uint8_t pEnhancedBlock,
uint16_t  wEnhancedBlockSize,
uint16_t pwEnhancedBlockLen 
)

Formats a given Buffer for FWEC Exchange.

Returns
Status code 0 or specific Errorcode
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pTxBuffer[In] Data to be formatted for FWEC
[in]wTxSize[In] Size of pTxBuffer (must be at least 4 bytes > than length to add CRC)
[in]wTxLen[In] Length of pTxBuffer
[out]pEnhancedBlock[Out] Correctly formatted Block
[in]wEnhancedBlockSize[In] Size of pEnhancedBlock
[out]pwEnhancedBlockLen[Out] Actual size of pEnhancedBlock

◆ phpalI14443p4_Sw_Int_VHBR_FormatRecvBlockFWEC()

phStatus_t phpalI14443p4_Sw_Int_VHBR_FormatRecvBlockFWEC ( uint8_t pRxEnhancedBlock,
uint16_t  wRxEnhancedBlockLen,
uint8_t pRxBuffer,
uint16_t  wRxBufferSize,
uint16_t pwRxLen,
uint16_t pwRxStartPos 
)

Converts a recieved Buffer from FWEC Format to normal data.

Returns
Status code 0 or specific Errorcode
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pRxEnhancedBlock[In] Data to be converted
[in]wRxEnhancedBlockLen[In] Length of Data to be converted
[out]pRxBuffer[Out] Converted Data
[in]wRxBufferSize[In] Size of Buffer for converted Data
[out]pwRxLen[Out] Size of converted Data (including the offset)
[out]pwRxStartPos[Out] Offset of the real data in the rx buffer

◆ 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 underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wOption[In] Option parameter.
[in]bCommandCode[In] Code of the request command to send.
[in]bDataLength[In] Lenght 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]pDataParams[In] Pointer to this layer's parameter structure.
[in]bPduMask[In] Bit mask of the desired PDU type.
[in]bOption[In] Option bit; either PH_ON or PH_OFF.
[in]bDataLength[In] Lenght 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]pDataParams[In] Pointer to this layer's parameter structure.
[in]bDataLength[In] Lenght 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]pDataParams[In] Pointer to this layer's parameter structure.
[out]pProtLength[Out] Complete 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]pDataParams[In] Pointer to this layer's parameter structure.
[in]pFrame[In] Pointer to the received data buffer.
[in]wFrameLength[In] Length of the received frame.
[in]bExpectedResponseCode[In] The expected response command code the frame should contain.
[out]ppValidatedFrame[Out] Pointer to validated and normalized frame.
[out]pValidatedFrameLength[Out] Length of validated and normalized frame.
[out]ppPayload[Out] Pointer to begin of data payload (header skipped).
[out]pPayloadLength[Out] Length 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]wHalDatarate[In] Datarate read out from HAL.
[out]pI18092Datarate[Out] Pointer 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 underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wOption[In] Option parameter.
[in]pTxBuffer[In] Data to transmit.
[in]wTxLength[In] Length of data to transmit.
[out]ppRawResponse[Out] Pointer to raw DEP frame.
[out]pRawResponseLength[Out] Length of raw DEP frame.
[out]ppNormalizedResponse[Out] Pointer to validated and normalized frame.
[out]pNormalizedResponseLength[Out] Length of validated and normalized frame.
[out]ppPayload[Out] Pointer to begin of data payload (header skipped).
[out]pPayloadLength[Out] Length 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]status[In] HAL NAK Code.

◆ phpalMifare_SamAV3_X_ConvertNak()

phStatus_t phpalMifare_SamAV3_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]status[In] HAL NAK Code.