2.103.35 SERCOMx_ISO7816_Data_Read_Atr
C
/* x = SERCOM instance number */
uint8_t SERCOMx_ISO7816_Data_Read_Atr( uint8_t *p_atr )
Summary
This API reads the ATR response received from ISO7816 Smartcard
Description
This API allows the application to receive the answer to reset (ATR) response from card. The API reads data byte by byte until all the ATR bytes are received from card as per ISO/IEC 7816 standards. It returns the byte count it received as response.
Precondition
SERCOMx_ISO7816_Cold_Reset (or) Warm_Reset functions must be called to get device out of reset. It allow the card to transmit ATR data.
Parameters
Param | Description |
p_atr | Pointer to the ATR buffer. This contains the data to be decoded. |
Returns
The API returns the number of bytes it received from card.
Example
#define RX_BUFFER_SIZE 256
uint8_t resp_rcvd[RX_BUFFER_SIZE];
uint8_t ATR_byteCount;
ATR_byteCount = SERCOM3_ISO7816_Data_Read_Atr((uint8_t*)resp_rcvd);
Remarks
None