Icc_ptsnegotiate(), E 76) – Maxim Integrated 73S12xxF Software User Manual
Page 76

73S12xxF Software User Guide
UG_12xxF_016
76
Rev. 1.50
ICC_PTSNegotiate()
Purpose
Transmit the PTS negotiation request to the Smart Card and verify its answer. When
the PTS negotiation succeeds, the 73S12xxF configures its internal protocol
parameters with the negotiated values.
Synopsis
AR_ICC_RC ICC_PTSNegotiate (
IN enum ICC_ID eIccId,
IN BOOLEAN bIccChangeProtocol,
IN BOOLEAN bIccChangeSpeed,
IN BOOLEAN bIccSelectT1Protocol,
IN unsigned char ucIccFiDi,
OUT unsigned char *pucIccPTS,
OUT unsigned int *punIccPTSLength );
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)
bIccChangeProtocol: Input parameter
Specifies whether the protocol is to be changed (TRUE) or not.
bIccChangeSpeed: Input parameter
Specifies whether the speed is to be changed (TRUE) or not.
bIccSelectT1Protocol: Input parameter
Specifies whether T=1 protocol is selected (TRUE) or T=0 (FALSE). This parameter
is ignored if bIccChangeProtocol is set to FALSE.
ucIccFiDi: Input parameter
Specifies the new bit rate and clock adjustment factors to be used (in case
bIccChangeSpeed is set to TRUE)
pucIccPTS: Output parameter
Contains the PTS answer received from the Smart Card.
punIccPTSLength: Output parameter
Contains the length of the PTS answer received from the Smart Card. This value
should be in the range 03 to 06.
Return Codes
AR_ICC_OK
Successful operation. The PTS negotiation succeeded. The PTS answer from
the Smart Card is stored in pucIccPTS.
AR_ICC_ERR_CARD_MUTE
The Smart Card does not respond to the PTS negotiation.
AR_ICC_ERR_CARD_ABSENT
No Smart Card is inserted.
AR_ICC_ERR_CARD_DISCONNECTED
The Smart Card was removed during the PTS negotiation operation.
AR_ICC_ERR_CARD_OVERLOAD
The Smart Card has generated an overload.
AR_ICC_ERR_BAD_PARAM
Incorrect bytes were sent by the card.
ICC_ERR_PTS_NEGOTIATION
FiDi to negotiate is unacceptable.