NXP Reader Library  v17.1.0.2535
Component : PCSC (Windows)

PC/SC BAL Windows. More...

Collaboration diagram for Component : PCSC (Windows):

Data Structures

struct  phbalReg_PcscWin_DataParams_t
 PCSC (Windows) BAL parameter structure. More...
 

Macros

#define PHBAL_REG_PCSCWIN_ID   0x06U
 ID for PCSC BAL component (Win32)
 

Functions

phStatus_t phbalReg_PcscWin_Init (phbalReg_PcscWin_DataParams_t *pDataParams, uint16_t wSizeOfDataParams, uint8_t *pAtrBuffer, uint16_t wAtrBufSize)
 Initialise the PCSC BAL component. More...
 

BAL Communication Configs

#define PHBAL_REG_PCSCWIN_CONFIG_PROTOCOL   (PH_CONFIG_CUSTOM_BEGIN + 0)
 Used Protocol; e.g. More...
 
#define PHBAL_REG_PCSCWIN_CONFIG_SHARE   (PH_CONFIG_CUSTOM_BEGIN + 1)
 Used Access mode; e.g. More...
 
#define PHBAL_REG_PCSCWIN_CONFIG_USE_WARM_ATR   (PH_CONFIG_CUSTOM_BEGIN + 2)
 Define if the warm atr should used. More...
 
#define PHBAL_REG_PCSCWIN_CONFIG_CARD_STATE   (PH_CONFIG_CUSTOM_BEGIN + 3)
 Current state of the smart card in the reader. More...
 
#define PHBAL_REG_PCSCWIN_CONFIG_ACTIVE_PROTOCOL   (PH_CONFIG_CUSTOM_BEGIN + 4)
 Get the used Protocol; e.g. More...
 
#define PHBAL_REG_PCSCWIN_CONFIG_PEGODA2_MODE   (PH_CONFIG_CUSTOM_BEGIN + 5)
 Define if the Pegoda 2 Mode should used. More...
 

Custom Option Bits: Can be used for \ref phhalHw_Exchange.

#define PHBAL_REG_PCSCWIN_OPTION_SCARDCONTROL   0x0010U
 Calls SCardControl with given parameters. More...
 

BAL Communication Configuration values

#define PHBAL_REG_PCSCWIN_VALUE_PROTOCOL_T0   0x0000U
 T=0 protocol.
 
#define PHBAL_REG_PCSCWIN_VALUE_PROTOCOL_T1   0x0001U
 T=1 protocol.
 
#define PHBAL_REG_PCSCWIN_VALUE_PROTOCOL_RAW   0x0002U
 RAW protocol.
 
#define PHBAL_REG_PCSCWIN_VALUE_PROTOCOL_AUTO   0x0003U
 Use T=0|T=1|RAW protocol.
 
#define PHBAL_REG_PCSCWIN_VALUE_PROTOCOL_UNDEFINED   0x0004U
 UNDEFINED protocol.
 
#define PHBAL_REG_PCSCWIN_VALUE_SHARE_SHARED   0x0000U
 SHARED access.
 
#define PHBAL_REG_PCSCWIN_VALUE_SHARE_EXCLUSIVE   0x0001U
 EXCLUSIVE access.
 
#define PHBAL_REG_PCSCWIN_VALUE_SHARE_DIRECT   0x0002U
 DIRECT access.
 

Detailed Description

PC/SC BAL Windows.

Smartcard Interface.

Macro Definition Documentation

◆ PHBAL_REG_PCSCWIN_OPTION_SCARDCONTROL

#define PHBAL_REG_PCSCWIN_OPTION_SCARDCONTROL   0x0010U

Calls SCardControl with given parameters.

Make sure pTxBuffer contents are as follows:

pTxBuffer[0] pTxBuffer[1] pTxBuffer[2] pTxBuffer[3] [pTxBuffer[4-n]]
+--------------------------+--------------------------+--------------------------+--------------------------+----------------------+
| dwControlCode(bit 31-24) | dwControlCode(bit 23-16) | dwControlCode(bit 15-8) | dwControlCode(bit 7-0) | [Data] |
+--------------------------+--------------------------+--------------------------+--------------------------+----------------------+

◆ PHBAL_REG_PCSCWIN_CONFIG_PROTOCOL

#define PHBAL_REG_PCSCWIN_CONFIG_PROTOCOL   (PH_CONFIG_CUSTOM_BEGIN + 0)

◆ PHBAL_REG_PCSCWIN_CONFIG_SHARE

#define PHBAL_REG_PCSCWIN_CONFIG_SHARE   (PH_CONFIG_CUSTOM_BEGIN + 1)

Used Access mode; e.g.

PHBAL_REG_PCSCWIN_VALUE_SHARE_SHARED.

◆ PHBAL_REG_PCSCWIN_CONFIG_USE_WARM_ATR

#define PHBAL_REG_PCSCWIN_CONFIG_USE_WARM_ATR   (PH_CONFIG_CUSTOM_BEGIN + 2)

Define if the warm atr should used.

Values: PH_ON, PH_OFF.

◆ PHBAL_REG_PCSCWIN_CONFIG_CARD_STATE

#define PHBAL_REG_PCSCWIN_CONFIG_CARD_STATE   (PH_CONFIG_CUSTOM_BEGIN + 3)

Current state of the smart card in the reader.

See SCardStatus

◆ PHBAL_REG_PCSCWIN_CONFIG_ACTIVE_PROTOCOL

#define PHBAL_REG_PCSCWIN_CONFIG_ACTIVE_PROTOCOL   (PH_CONFIG_CUSTOM_BEGIN + 4)

Get the used Protocol; e.g.

PHBAL_REG_PCSCWIN_VALUE_PROTOCOL_T0.

◆ PHBAL_REG_PCSCWIN_CONFIG_PEGODA2_MODE

#define PHBAL_REG_PCSCWIN_CONFIG_PEGODA2_MODE   (PH_CONFIG_CUSTOM_BEGIN + 5)

Define if the Pegoda 2 Mode should used.

Values: PH_ON, PH_OFF.

Function Documentation

◆ phbalReg_PcscWin_Init()

phStatus_t phbalReg_PcscWin_Init ( phbalReg_PcscWin_DataParams_t pDataParams,
uint16_t  wSizeOfDataParams,
uint8_t pAtrBuffer,
uint16_t  wAtrBufSize 
)

Initialise the PCSC BAL component.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSParameter structure size is invalid.
PH_ERR_INVALID_PARAMETERwAtrBufSize is invalid.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wSizeOfDataParams[In] Specifies the size of the data parameter structure.
[in]pAtrBuffer[In] Pointer to buffer used for storing the ATR after card activation.
[in]wAtrBufSize[In] Size of the ATR buffer.