NXP Reader Library  v17.1.0.2535

PCSC command functions. More...

Collaboration diagram for Instruction:

Macros

#define PHHAL_HW_PCSC_UID   0x00U
 Get UID of detected card. More...
 
#define PHHAL_HW_PCSC_HIST   0x01U
 Get historical bytes of detected card. More...
 
#define PHHAL_HW_PCSC_KEY_CARD   0x00U
 Card key type. More...
 
#define PHHAL_HW_PCSC_KEY_READER   0x01U
 Reader key type. More...
 
#define PHHAL_HW_PCSC_TX_PLAIN   0x00U
 Key transmission type - plain. More...
 
#define PHHAL_HW_PCSC_TX_SECURED   0x01U
 Key transmission type - secured. More...
 
#define PHHAL_HW_PCSC_KEY_LOC_VOLATILE   0x00U
 Keys are loaded into the reader volatile memory. More...
 
#define PHHAL_HW_PCSC_KEY_LOC_NONVOLATILE   0x01U
 Keys are loaded into the reader non-volatile memory. More...
 
#define PHHAL_HW_PCSC_KEY_A   0x60U
 Key A for Mifare. More...
 
#define PHHAL_HW_PCSC_KEY_B   0x61U
 Key B for PicoTag and PicoPass Debit key or Credit key. More...
 
#define PHHAL_HW_PCSC_ISO14443A   0x00U
 Switch Protocol Type A (ISO 14443A). More...
 
#define PHHAL_HW_PCSC_ISO15693   0x02U
 Switch Protocol ISO 15693. More...
 
#define PHHAL_HW_PCSC_LAYER_2   0x02U
 Switch Protocol Layer 2. More...
 
#define PHHAL_HW_PCSC_LAYER_3   0x03U
 Switch Protocol Layer 3. More...
 
#define PHHAL_HW_PCSC_LAYER_4   0x04U
 Switch Protocol Layer 4. More...
 

Functions

phStatus_t phhalHw_Pcsc_Cmd_GetData (phhalHw_Pcsc_DataParams_t *pDataParams, uint8_t bOption, uint8_t *pData, uint16_t *pDataLength)
 PCSC Get Data Command. More...
 
phStatus_t phhalHw_Pcsc_Cmd_LoadKeys (phhalHw_Pcsc_DataParams_t *pDataParams, uint8_t bKeyType, uint8_t bTxType, uint8_t bReaderEncryptionKeyNo, uint8_t bKeyLocation, uint8_t bKeyNumber, uint8_t *pKey, uint8_t bKeyLength)
 The command will just load (write) the keys in the reader memory. More...
 
phStatus_t phhalHw_Pcsc_Cmd_GeneralAuthenticate (phhalHw_Pcsc_DataParams_t *pDataParams, uint8_t bKeyType, uint8_t bKeyNumber, uint16_t wAddress)
 PCSC General Authenticate command. More...
 
phStatus_t phhalHw_Pcsc_Cmd_Verify (phhalHw_Pcsc_DataParams_t *pDataParams, uint8_t bTxType, uint8_t bReaderEncryptionKeyNo, uint8_t bRefData, uint8_t *pPin, uint8_t bPinLength)
 PCSC Verify command. More...
 
phStatus_t phhalHw_Pcsc_Cmd_ReadBinary (phhalHw_Pcsc_DataParams_t *pDataParams, uint16_t wAddress, uint8_t bBytesToRead, uint8_t **ppData, uint16_t *pDataLength)
 PCSC Read Binary command. More...
 
phStatus_t phhalHw_Pcsc_Cmd_UpdateBinary (phhalHw_Pcsc_DataParams_t *pDataParams, uint16_t wAddress, uint8_t *pData, uint8_t bDataLength)
 PCSC Update Binary command. More...
 
phStatus_t phhalHw_Pcsc_Cmd_Increment (phhalHw_Pcsc_DataParams_t *pDataParams, uint8_t bBlockNo, uint8_t *pValue)
 PCSC Increment command. More...
 
phStatus_t phhalHw_Pcsc_Cmd_Decrement (phhalHw_Pcsc_DataParams_t *pDataParams, uint8_t bBlockNo, uint8_t *pValue)
 PCSC Decrement command. More...
 
phStatus_t phhalHw_Pcsc_Cmd_StartTransparentSession (phhalHw_Pcsc_DataParams_t *pDataParams)
 PCSC Start Transparent Session (Part of Manage Session Command). More...
 
phStatus_t phhalHw_Pcsc_Cmd_EndTransparentSession (phhalHw_Pcsc_DataParams_t *pDataParams)
 PCSC End Transparent Session (Part of Manage Session Command). More...
 
phStatus_t phhalHw_Pcsc_Cmd_Version (phhalHw_Pcsc_DataParams_t *pDataParams, uint8_t *pVersion)
 PCSC Version command (Part of Manage Session Command). More...
 
phStatus_t phhalHw_Pcsc_Cmd_RfOff (phhalHw_Pcsc_DataParams_t *pDataParams)
 PCSC RF off command (Part of Manage Session Command). More...
 
phStatus_t phhalHw_Pcsc_Cmd_RfOn (phhalHw_Pcsc_DataParams_t *pDataParams)
 PCSC RF on command (Part of Manage Session Command). More...
 
phStatus_t phhalHw_Pcsc_Cmd_RfReset (phhalHw_Pcsc_DataParams_t *pDataParams)
 Call PCSC RF off and RF on commands with a delay in between. More...
 
phStatus_t phhalHw_Pcsc_Cmd_GetParam (phhalHw_Pcsc_DataParams_t *pDataParams, uint8_t bParamType, uint8_t *pParamValue, uint8_t *pParamLength)
 PCSC Get Parameter command. More...
 
phStatus_t phhalHw_Pcsc_Cmd_SetParam (phhalHw_Pcsc_DataParams_t *pDataParams, uint8_t bParamType, uint8_t *pParamValue, uint8_t bParamLength)
 PCSC Set Parameter command. More...
 
phStatus_t phhalHw_Pcsc_Cmd_TxRxFlag (phhalHw_Pcsc_DataParams_t *pDataParams, uint16_t wValue)
 PCSC Transmission and Reception (Tx/Rx) Flag command. More...
 
phStatus_t phhalHw_Pcsc_Cmd_Transceive (phhalHw_Pcsc_DataParams_t *pDataParams, uint16_t wOption, uint8_t *pTxData, uint16_t wTxLength, uint8_t **ppRxData, uint16_t *pRxLength)
 PCSC Transceive command. More...
 
phStatus_t phhalHw_Pcsc_Cmd_SwitchProtocol (phhalHw_Pcsc_DataParams_t *pDataParams, uint8_t bProtocol, uint8_t bLayer)
 PCSC Switch Protocol command. More...
 

Detailed Description

PCSC command functions.

Macro Definition Documentation

◆ PHHAL_HW_PCSC_UID

#define PHHAL_HW_PCSC_UID   0x00U

Get UID of detected card.


◆ PHHAL_HW_PCSC_HIST

#define PHHAL_HW_PCSC_HIST   0x01U

Get historical bytes of detected card.


◆ PHHAL_HW_PCSC_KEY_CARD

#define PHHAL_HW_PCSC_KEY_CARD   0x00U

Card key type.


◆ PHHAL_HW_PCSC_KEY_READER

#define PHHAL_HW_PCSC_KEY_READER   0x01U

Reader key type.


◆ PHHAL_HW_PCSC_TX_PLAIN

#define PHHAL_HW_PCSC_TX_PLAIN   0x00U

Key transmission type - plain.


◆ PHHAL_HW_PCSC_TX_SECURED

#define PHHAL_HW_PCSC_TX_SECURED   0x01U

Key transmission type - secured.


◆ PHHAL_HW_PCSC_KEY_LOC_VOLATILE

#define PHHAL_HW_PCSC_KEY_LOC_VOLATILE   0x00U

Keys are loaded into the reader volatile memory.


◆ PHHAL_HW_PCSC_KEY_LOC_NONVOLATILE

#define PHHAL_HW_PCSC_KEY_LOC_NONVOLATILE   0x01U

Keys are loaded into the reader non-volatile memory.


◆ PHHAL_HW_PCSC_KEY_A

#define PHHAL_HW_PCSC_KEY_A   0x60U

Key A for Mifare.


◆ PHHAL_HW_PCSC_KEY_B

#define PHHAL_HW_PCSC_KEY_B   0x61U

Key B for PicoTag and PicoPass Debit key or Credit key.


◆ PHHAL_HW_PCSC_ISO14443A

#define PHHAL_HW_PCSC_ISO14443A   0x00U

Switch Protocol Type A (ISO 14443A).


◆ PHHAL_HW_PCSC_ISO15693

#define PHHAL_HW_PCSC_ISO15693   0x02U

Switch Protocol ISO 15693.


◆ PHHAL_HW_PCSC_LAYER_2

#define PHHAL_HW_PCSC_LAYER_2   0x02U

Switch Protocol Layer 2.


◆ PHHAL_HW_PCSC_LAYER_3

#define PHHAL_HW_PCSC_LAYER_3   0x03U

Switch Protocol Layer 3.


◆ PHHAL_HW_PCSC_LAYER_4

#define PHHAL_HW_PCSC_LAYER_4   0x04U

Switch Protocol Layer 4.


Function Documentation

◆ phhalHw_Pcsc_Cmd_GetData()

phStatus_t phhalHw_Pcsc_Cmd_GetData ( phhalHw_Pcsc_DataParams_t pDataParams,
uint8_t  bOption,
uint8_t pData,
uint16_t pDataLength 
)

PCSC Get Data Command.

This command can be used to get the UID or historical bytes of the card detected.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETERInput parameter(s) invalid.
PH_ERR_INTERNAL_ERRORCommunication error.
PH_ERR_LENGTH_ERRORInvalid response length / TLV length.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bOption[In] PHHAL_HW_PCSC_UID or PHHAL_HW_PCSC_HIST.
[out]pData[Out] UID or Historical bytes based on bOption.
[out]pDataLength[Out] Length of pData.

◆ phhalHw_Pcsc_Cmd_LoadKeys()

phStatus_t phhalHw_Pcsc_Cmd_LoadKeys ( phhalHw_Pcsc_DataParams_t pDataParams,
uint8_t  bKeyType,
uint8_t  bTxType,
uint8_t  bReaderEncryptionKeyNo,
uint8_t  bKeyLocation,
uint8_t  bKeyNumber,
uint8_t pKey,
uint8_t  bKeyLength 
)

The command will just load (write) the keys in the reader memory.

The key will be of two different types; the reader key and the card key. Reader Key: This key will be used to protect the transmission of secured data e.g. card key from the application to the reader. Card Key: This is the card specific key (e.g. for Mifare it is Mifare key).

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETERInput parameter(s) invalid.
PH_ERR_BUFFER_OVERFLOWNot enough TX buffer space .
PH_ERR_INTERNAL_ERRORCommunication error.
PH_ERR_LENGTH_ERRORInvalid response length / TLV length.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bKeyType[In] Key Type PHHAL_HW_PCSC_KEY_CARD or PHHAL_HW_PCSC_KEY_READER.
[in]bTxType[In] Transmission Type.PHHAL_HW_PCSC_TX_PLAIN or PHHAL_HW_PCSC_TX_SECURED
[in]bReaderEncryptionKeyNo[In] Reader encryption key number if PHHAL_HW_PCSC_TX_SECURED is used else 0.
[in]bKeyLocation[In] Location to store key in reader PHHAL_HW_PCSC_KEY_LOC_VOLATILE or PHHAL_HW_PCSC_KEY_LOC_NONVOLATILE.
[in]bKeyNumber[In] Key number to be used for current key.
[in]pKey[In] Key to be loaded.
[in]bKeyLength[In] Key length.

◆ phhalHw_Pcsc_Cmd_GeneralAuthenticate()

phStatus_t phhalHw_Pcsc_Cmd_GeneralAuthenticate ( phhalHw_Pcsc_DataParams_t pDataParams,
uint8_t  bKeyType,
uint8_t  bKeyNumber,
uint16_t  wAddress 
)

PCSC General Authenticate command.

This command shall be used to authenticate cards (like Mifare cards). The key number shall be same as the key number specified in LoadKeys command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETERInput parameter(s) invalid.
PH_ERR_INTERNAL_ERRORCommunication error.
PH_ERR_LENGTH_ERRORInvalid response length / TLV length.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bKeyType[In] Key Type PHHAL_HW_PCSC_KEY_A or PHHAL_HW_PCSC_KEY_B.
[in]bKeyNumber[In] Key number to be used for authentication.
[in]wAddress[In] Block number or the starting byte number of the card to be authenticated.

◆ phhalHw_Pcsc_Cmd_Verify()

phStatus_t phhalHw_Pcsc_Cmd_Verify ( phhalHw_Pcsc_DataParams_t pDataParams,
uint8_t  bTxType,
uint8_t  bReaderEncryptionKeyNo,
uint8_t  bRefData,
uint8_t pPin,
uint8_t  bPinLength 
)

PCSC Verify command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETERInput parameter(s) invalid.
PH_ERR_BUFFER_OVERFLOWNot enough TX buffer space .
PH_ERR_INTERNAL_ERRORCommunication error.
PH_ERR_LENGTH_ERRORInvalid response length / TLV length.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bTxType[In] Transmission Type.PHHAL_HW_PCSC_TX_PLAIN or PHHAL_HW_PCSC_TX_SECURED
[in]bReaderEncryptionKeyNo[In] Reader encryption key number if PHHAL_HW_PCSC_TX_SECURED is used else 0.
[in]bRefData[In] Reference data.
[in]pPin[In] Pin.
[in]bPinLength[In] Pin length.

◆ phhalHw_Pcsc_Cmd_ReadBinary()

phStatus_t phhalHw_Pcsc_Cmd_ReadBinary ( phhalHw_Pcsc_DataParams_t pDataParams,
uint16_t  wAddress,
uint8_t  bBytesToRead,
uint8_t **  ppData,
uint16_t pDataLength 
)

PCSC Read Binary command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETERInput parameter(s) invalid.
PH_ERR_BUFFER_OVERFLOWNot enough RX buffer space .
PH_ERR_INTERNAL_ERRORReader returned error (error updated in "bErrorCode").
PH_ERR_LENGTH_ERRORInvalid response length / TLV length.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wAddress[In] Block number or the starting address to read from.
[in]bBytesToRead[In] Expected read data length; Le field (extended Le not supported).
[out]ppData[Out] Read data.
[out]pDataLength[Out] Read data length.

◆ phhalHw_Pcsc_Cmd_UpdateBinary()

phStatus_t phhalHw_Pcsc_Cmd_UpdateBinary ( phhalHw_Pcsc_DataParams_t pDataParams,
uint16_t  wAddress,
uint8_t pData,
uint8_t  bDataLength 
)

PCSC Update Binary command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETERInput parameter(s) invalid.
PH_ERR_BUFFER_OVERFLOWNot enough TX buffer space .
PH_ERR_INTERNAL_ERRORReader returned error (error updated in "bErrorCode").
PH_ERR_LENGTH_ERRORInvalid response length / TLV length.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wAddress[In] Block number or the starting address to write from.
[in]pData[In] Data to write.
[in]bDataLength[In] Data length.

◆ phhalHw_Pcsc_Cmd_Increment()

phStatus_t phhalHw_Pcsc_Cmd_Increment ( phhalHw_Pcsc_DataParams_t pDataParams,
uint8_t  bBlockNo,
uint8_t pValue 
)

PCSC Increment command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETERInput parameter(s) invalid.
PH_ERR_BUFFER_OVERFLOWNot enough TX buffer space .
PH_ERR_INTERNAL_ERRORReader returned error (error updated in "bErrorCode").
PH_ERR_LENGTH_ERRORInvalid response length / TLV length.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bBlockNo[In] Block Number.
[in]pValue[In] Increment value.

◆ phhalHw_Pcsc_Cmd_Decrement()

phStatus_t phhalHw_Pcsc_Cmd_Decrement ( phhalHw_Pcsc_DataParams_t pDataParams,
uint8_t  bBlockNo,
uint8_t pValue 
)

PCSC Decrement command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETERInput parameter(s) invalid.
PH_ERR_BUFFER_OVERFLOWNot enough TX buffer space .
PH_ERR_INTERNAL_ERRORReader returned error (error updated in "bErrorCode").
PH_ERR_LENGTH_ERRORInvalid response length / TLV length.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bBlockNo[In] Block Number.
[in]pValue[In] Decrement value.

◆ phhalHw_Pcsc_Cmd_StartTransparentSession()

phStatus_t phhalHw_Pcsc_Cmd_StartTransparentSession ( phhalHw_Pcsc_DataParams_t pDataParams)

PCSC Start Transparent Session (Part of Manage Session Command).

The application shall send this data object to inform the reader of preparation for a transparent session.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INTERNAL_ERRORReader returned error (error updated in "bErrorCode").
PH_ERR_LENGTH_ERRORInvalid response length / TLV length.
PH_ERR_PROTOCOL_ERRORResponse format not as per PCSC specification.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.

◆ phhalHw_Pcsc_Cmd_EndTransparentSession()

phStatus_t phhalHw_Pcsc_Cmd_EndTransparentSession ( phhalHw_Pcsc_DataParams_t pDataParams)

PCSC End Transparent Session (Part of Manage Session Command).

The application shall send this to inform the reader of the end of a transparent session.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INTERNAL_ERRORReader returned error (error updated in "bErrorCode").
PH_ERR_LENGTH_ERRORInvalid response length / TLV length.
PH_ERR_PROTOCOL_ERRORResponse format not as per PCSC specification.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.

◆ phhalHw_Pcsc_Cmd_Version()

phStatus_t phhalHw_Pcsc_Cmd_Version ( phhalHw_Pcsc_DataParams_t pDataParams,
uint8_t pVersion 
)

PCSC Version command (Part of Manage Session Command).

The application can send this to get the version number of the IFD handler.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETERInput parameter(s) invalid.
PH_ERR_INTERNAL_ERRORReader returned error (error updated in "bErrorCode").
PH_ERR_LENGTH_ERRORInvalid response length / TLV length.
PH_ERR_PROTOCOL_ERRORResponse format not as per PCSC specification.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[out]pVersion[Out] Version number of IFD handler.

◆ phhalHw_Pcsc_Cmd_RfOff()

phStatus_t phhalHw_Pcsc_Cmd_RfOff ( phhalHw_Pcsc_DataParams_t pDataParams)

PCSC RF off command (Part of Manage Session Command).

Application can send this to switch off the RF field. This command will only be accepted after the start and before the end of a transparent session.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_USE_CONDITIONTransparent session not on.
PH_ERR_INTERNAL_ERRORReader returned error (error updated in "bErrorCode").
PH_ERR_LENGTH_ERRORInvalid response length / TLV length.
PH_ERR_PROTOCOL_ERRORResponse format not as per PCSC specification.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.

◆ phhalHw_Pcsc_Cmd_RfOn()

phStatus_t phhalHw_Pcsc_Cmd_RfOn ( phhalHw_Pcsc_DataParams_t pDataParams)

PCSC RF on command (Part of Manage Session Command).

Application can send this to switch on the RF field. This command will only be accepted after the start and before the end of a transparent session.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_USE_CONDITIONTransparent session not on.
PH_ERR_INTERNAL_ERRORReader returned error (error updated in "bErrorCode").
PH_ERR_LENGTH_ERRORInvalid response length / TLV length.
PH_ERR_PROTOCOL_ERRORResponse format not as per PCSC specification.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.

◆ phhalHw_Pcsc_Cmd_RfReset()

phStatus_t phhalHw_Pcsc_Cmd_RfReset ( phhalHw_Pcsc_DataParams_t pDataParams)

Call PCSC RF off and RF on commands with a delay in between.

Application can use this to do RF field reset. This command will only be accepted after the start and before the end of a transparent session.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_USE_CONDITIONTransparent session not on.
PH_ERR_INTERNAL_ERRORReader returned error (error updated in "bErrorCode").
PH_ERR_LENGTH_ERRORInvalid response length / TLV length.
PH_ERR_PROTOCOL_ERRORResponse format not as per PCSC specification.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.

◆ phhalHw_Pcsc_Cmd_GetParam()

phStatus_t phhalHw_Pcsc_Cmd_GetParam ( phhalHw_Pcsc_DataParams_t pDataParams,
uint8_t  bParamType,
uint8_t pParamValue,
uint8_t pParamLength 
)

PCSC Get Parameter command.

Application can send this to get the value of a configurable parameter.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETERInput parameter(s) invalid.
PH_ERR_INTERNAL_ERRORReader returned error (error updated in "bErrorCode").
PH_ERR_LENGTH_ERRORInvalid response length / TLV length.
PH_ERR_PROTOCOL_ERRORResponse format not as per PCSC specification.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bParamType[In] Parameter type.
[out]pParamValue[Out] Parameter value.
[out]pParamLength[Out] Parameter value length (in bytes).

◆ phhalHw_Pcsc_Cmd_SetParam()

phStatus_t phhalHw_Pcsc_Cmd_SetParam ( phhalHw_Pcsc_DataParams_t pDataParams,
uint8_t  bParamType,
uint8_t pParamValue,
uint8_t  bParamLength 
)

PCSC Set Parameter command.

Application can send this to set the value of a configurable parameter.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETERInput parameter(s) invalid.
PH_ERR_INTERNAL_ERRORReader returned error (error updated in "bErrorCode").
PH_ERR_LENGTH_ERRORInvalid response length / TLV length.
PH_ERR_PROTOCOL_ERRORResponse format not as per PCSC specification.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bParamType[In] Parameter type.
[in]pParamValue[In] Parameter value.
[in]bParamLength[In] Parameter value length (in bytes).

◆ phhalHw_Pcsc_Cmd_TxRxFlag()

phStatus_t phhalHw_Pcsc_Cmd_TxRxFlag ( phhalHw_Pcsc_DataParams_t pDataParams,
uint16_t  wValue 
)

PCSC Transmission and Reception (Tx/Rx) Flag command.

Application can send this to set the value of framing and RF parameters for the following transmission.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETERInput parameter(s) invalid.
PH_ERR_INTERNAL_ERRORReader returned error (error updated in "bErrorCode").
PH_ERR_LENGTH_ERRORInvalid response length / TLV length.
PH_ERR_PROTOCOL_ERRORResponse format not as per PCSC specification.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wValue[In] Transmission and Reception (Tx/Rx) Flag value.

◆ phhalHw_Pcsc_Cmd_Transceive()

phStatus_t phhalHw_Pcsc_Cmd_Transceive ( phhalHw_Pcsc_DataParams_t pDataParams,
uint16_t  wOption,
uint8_t pTxData,
uint16_t  wTxLength,
uint8_t **  ppRxData,
uint16_t pRxLength 
)

PCSC Transceive command.

Application can send this to exchange (transmit and receive) data with card.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETERInput parameter(s) invalid.
PH_ERR_INTERNAL_ERRORReader returned error (error updated in "bErrorCode").
PH_ERR_LENGTH_ERRORInvalid response length / TLV length.
PH_ERR_PROTOCOL_ERRORResponse format not as per PCSC specification.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wOption[In] Exchange option.
[in]pTxData[In] Data to transmit.
[in]wTxLength[In] Transmit data length.
[out]ppRxData[Out] Received data.
[out]pRxLength[Out] Received data length.

◆ phhalHw_Pcsc_Cmd_SwitchProtocol()

phStatus_t phhalHw_Pcsc_Cmd_SwitchProtocol ( phhalHw_Pcsc_DataParams_t pDataParams,
uint8_t  bProtocol,
uint8_t  bLayer 
)

PCSC Switch Protocol command.

Application can send this to switch to a specific protocol layer.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_USE_CONDITIONTransparent session not on.
PH_ERR_INVALID_PARAMETERInput parameter(s) invalid.
PH_ERR_INTERNAL_ERRORReader returned error (error updated in "bErrorCode").
PH_ERR_LENGTH_ERRORInvalid response length / TLV length.
PH_ERR_PROTOCOL_ERRORResponse format not as per PCSC specification.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bProtocol[In] Protocol to switch.
[in]bLayer[In] Protocol layer to switch.