Icc_rx(), E 37) – Maxim Integrated 73S12xxF Software User Manual
Page 37

UG_12xxF_016
73S12xxF Software User Guide
Rev. 1.50
37
ICC_Rx()
Purpose
Receive data from the SmartCard interface. Before calling this function, the
SmartCard UART must have been initialized and the selected SmartCard activated.
Synopsis
ICC_RC ICC_Rx ( INOUT struct ICC_t *pICC );
struct {
OUT char *IccData,
INOUT unsigned int IccLen,
IN Boolean IccLastByte,
INOUT Int IccEDC,
OUT ICC_RC ICC_Status,
OUT Boolean IccDone
} ICC_t;
Parameters
IccData: Output parameter
Contains the data currently received from the SmartCard.
IccLen: Input / output parameter
On input this is the number of requested bytes. On output this is the number of
successfully received bytes, valid after bIccDone is true.
IccLastByte: Input parameter
Specifies if the last byte has been received after getting these IccLen bytes.
IccEDC: Input / output parameter
Contains the current LRC or CRC value (T=1).
Icc_Status: Output
Contains the current status of this reception.
IccDone: Output
Set on completion of reception, possibly with errors. Check Icc_Status for status.
Return Codes
ICC_ERR_PRESENT_INACTIVE
The SmartCard is present, but inactive.
ICC_ERR_NO_CARD
The SmartCard is not present.
ICC_RX_PENDING
Reception has started, but is not yet completed. On either a successful
completion or a termination due to error, the ICC_Status will change to one of
the following:
ICC_OK
Successful operation, IccLen bytes have been received from the SmartCard.
ICC_BREAK
Successful operation, IccLen bytes have been received from the SmartCard, but
some bytes were initially received with parity error, necessitating some break
signaling of the SmartCard, forcing it to retransmit at least once (T=0).
ICC_ERR_BREAK
Data was always received with parity error, necessitating break signaling of the
SmartCard (T=0). The SmartCard has been automatically deactivated. Check
to determine how many bytes were successfully received.
ICC_ERR_TIMEOUT
A byte was not received before the maximum delay specified by
nIccWorkWaitingTime (T=0) or nIccCharWaitingTime (T=1) expired.
ICC_ERR_PARITY
A byte was received with an invalid parity.
ICC_ERR_OVERRUN
An RX overrun condition has occurred, resulting in the loss of at least one byte.