Software

73S12xxF Software User Guide UG_12xxF_016
72 Rev. 1.50
4.3 High-Level API
The 73S12xxF comes with a high-level API library to control the Smart Card. This library is linked to the
low-level API as described in Section 4.2 Low-level API for all smart card communication controls.
4.3.1 Smart Card Control
This API provides support for the asynchronous (T=0) and (T=1) Smart Card protocol management.
Each Smart Card interface is individually addressed by specifying the correct eIccId value. Up to 9 smart
card slots can be configured, with the first (ICC_1ST) being the internal slot and the next 8 being external
slots. The API provides specific support for several test suite constraints (Microsoft WHQL (aka HCT),
EMVCo (MCI and VCI)) by adding several options to most of the API functions.
The Smart Card API includes:
ICC_Enable() or ICC_Enable_Ext () (page 73)
ICC_WarmReset() (page 75)
ICC_PTSNegotiate() (page 76)
ICC_Send() (page 77)
ICC_Send_Ext() (page 78)
ICC_Configure_Ext () (page 79)
ICC_Configure() (page 82)
ICC_Disable() (page 83)
ICC_CheckPresence() (page 84)
In order to use this API, the following minimum set of files is required:
IccMgt.h: header file which contains the prototypes for the API services.
Icc_api-*.lib: this is the ICC library itself.
Allocate.c: allows configuring the number of ICC interfaces used (therefore, only the memory for the
used interfaces is reserved).
Api_12.h and API_Struct_12.h: header files for low-level API.
Portable.h: contains definitions for C code portability.
Several applications are included in the release which deal with multiple smart card slots. In order for the
multiple smart card slot feature to function properly, it must first be configured using the ICC_Configure()
API. For a sample utilization of the ICC library, see the sample applications: CCID firmware or Pseudo-
CCID firmware.
Configuring the ICC Interfaces
The ICC_USED_INTERFACE_NUMBER and INTERFACE_USED[9] definitions in the Allocate.c file
must be modified as shown below before using the API services. In this example, Smart card slots 1 and
2 are to be utilized.
#define ICC_USED_INTERFACE_NUMBER 2 //two smartcard slots
unsigned char code INTERFACE_USED[9] =
{
ICC_1ST,
ICC_2ND,
ICC_NONE,
ICC_NONE,
ICC_NONE,
ICC_NONE,