|
NXP Reader Library
v17.1.0.2535
|
|
Example code to configure HAL and BAL for PCSC reader.
More...
|
| | Pcsc Initialization |
| | Example code to configure PAL 3A, 4A, 4 and MIFARE to work in Pcsc mode. This is valid for Pcsc readers only.
|
| |
Example code to configure HAL and BAL for PCSC reader.
#define CHECK_SUCCESS(x) \
if ( (x) != PH_ERR_SUCCESS ) \
{ \
printf ( "\n\n" ); \
printf ( "An error occurred: (0x%04X)\n", (x) ); \
printf ( "Pressing any key will exit the demo.\n" ); \
_getch (); \
return 0; \
}
void* pBal_Generic = NULL;
void* pHal_Generic = NULL;
aKeyUsageCounter, 0xFF );
CHECK_SUCCESS ( wStatus );
CHECK_SUCCESS ( wStatus );
CHECK_SUCCESS ( wStatus );
CHECK_SUCCESS ( wStatus );
CHECK_SUCCESS ( wStatus );
CHECK_SUCCESS ( wStatus );
wStatus =
phhalHw_Pcsc_Init ( &stHal_Pcsc,
sizeof ( stHal_Pcsc ), &stBal_Pcsc, stKeyStore, aTx_HalBuffer,
sizeof ( aTx_HalBuffer ),
aRx_HalBuffer, sizeof ( aRx_HalBuffer ) );
CHECK_SUCCESS ( wStatus );
pBal_Generic = &stBal_Pcsc;
pHal_Generic = &stHal_Pcsc;
PCSC (Windows) BAL parameter structure.
Definition: phbalReg.h:600
phStatus_t phKeyStore_Sw_Init(phKeyStore_Sw_DataParams_t *pDataParams, uint16_t wSizeOfDataParams, phKeyStore_Sw_KeyEntry_t *pKeyEntries, uint16_t wNoOfKeyEntries, phKeyStore_Sw_KeyVersionPair_t *pKeyVersionPairs, uint16_t wNoOfVersionPairs, phKeyStore_Sw_KUCEntry_t *pKUCEntries, uint16_t wNoOfKUCEntries)
Initializes the KeyStore component as software component.
Serial (Windows) BAL parameter structure.
Definition: phbalReg.h:43
Software KeyEntry structure.
Definition: phKeyStore.h:66
#define PHBAL_REG_PCSCWIN_VALUE_PROTOCOL_T1
T=1 protocol.
Definition: phbalReg.h:638
Software parameter structure.
Definition: phKeyStore.h:82
Software KeyVersionPair structure for Symmetric and ASymmetric keys.
Definition: phKeyStore.h:51
uint16_t phStatus_t
phcsBfl_Status_t is a signed short value, using the positive range.
Definition: ph_TypeDefs.h:158
phStatus_t phbalReg_SetPort(void *pDataParams, uint8_t *pPortName)
Select Port to be used.
unsigned short uint16_t
16 bit unsigned integer
Definition: ph_TypeDefs.h:62
Software KeyUsageCounter structure.
Definition: phKeyStore.h:75
phStatus_t phbalReg_SetConfig(void *pDataParams, uint16_t wConfig, uint16_t wValue)
Set configuration parameter.
#define PHBAL_REG_PCSCWIN_VALUE_PROTOCOL_T0
T=0 protocol.
Definition: phbalReg.h:637
PCSC HAL component.
Definition: phhalHw.h:2088
#define PHBAL_REG_PCSCWIN_CONFIG_SHARE
Used Access mode; e.g.
Definition: phbalReg.h:628
phStatus_t phbalReg_OpenPort(void *pDataParams)
Open communication port.
phStatus_t phbalReg_PcscWin_Init(phbalReg_PcscWin_DataParams_t *pDataParams, uint16_t wSizeOfDataParams, uint8_t *pAtrBuffer, uint16_t wAtrBufSize)
Initialise the PCSC BAL component.
#define PHBAL_REG_PCSCWIN_CONFIG_PROTOCOL
Used Protocol; e.g.
Definition: phbalReg.h:627
unsigned char uint8_t
8 bit unsigned integer
Definition: ph_TypeDefs.h:56
#define PHBAL_REG_PCSCWIN_VALUE_SHARE_SHARED
SHARED access.
Definition: phbalReg.h:642
phStatus_t phhalHw_Pcsc_Init(phhalHw_Pcsc_DataParams_t *pDataParams, uint16_t wSizeOfDataParams, void *pBalDataParams, void *pKeyStoreDataParams, uint8_t *pTxBuffer, uint16_t wTxBufSize, uint8_t *pRxBuffer, uint16_t wRxBufSize)
Initializes the PCSC HAL component.