Icc_checkpresence(), E 84) – Maxim Integrated 73S12xxF Software User Manual
Page 84

73S12xxF Software User Guide
UG_12xxF_016
84
Rev. 1.50
Parameters
eIccId: Input parameter
Specifies which Smart Card interface is to be activated. Possible values are:
ICC_1ST 0, (Internal)
ICC_2ND 1, (External)
…
ICC_9TH 8 (External)
Return Codes
AR_ICC_OK
Successful operation.
AR_ICC_ERR_BAD_PARAM
Invalid ICC Slot.
ICC_CheckPresence()
Purpose
Return the status of the specified ICC interface.
Synopsis
AR_ICC_RC ICC_CheckPresence ( IN enum ICC_ID eIccId );
Parameters
eIccId: Input parameter.
The lower (least significant) 4-bits specify which Smart Card interface to activate.
Possible values are:
ICC_1ST 0, (Internal)
ICC_2ND 1, (External)
…
ICC_9TH 8 (External).
The higher (most significant) 4-bits specify whether the card detect polarity is high
(CARD_DET_H) or low (CARD_DET_L). See additional details at the end of the
description of this function.
Return Codes
AR_ICC_OK
Successful operation. The Smart card is present and activated.
AR_ICC_ERR_CARD_ABSENTNo
A Smart Card is present in this interface.
AR_ICC_ERR_CARD_DISCONNECTED
The Smart Card is present but not activated.
The eIccId parameter is split into two fields: Card Detect Polarity and Card Slot number, by using the
most significant nibble and least significant nibble, respectively. Therefore, the most significant nibble of
the eIccId parameter is used to determine if the Card Detect Polarity is to be configured High or Low.
The constants CARD_DET_H and CARD_DET_L are defined in ICCMgt.h.
Examples:
1. If Card Detect Polarity is to be set to High when a card is inserted, it can be done so by calling:
ICC_Enable( eIccId | CARD_DET_H, bIccATRAutoCheck,etc.).
2. If Card Detect Polarity is to be set to Low when a card is inserted, it can be done so by calling:
ICC_Enable( eIccId | CARD_DET_L, bIccATRAutoCheck,etc.).
3. Calling ICC_Enable (eIccId, bIccATRAutoCheck, etc.) without OR’ing eIccId with CARD_DET_L or
CARD_DET_H (in other words, eIccID <= 0x09) will default to CARD_DET_H.