SAM3S8/SD8 Software Package: libraries/libboard_sam3s-ek2/source/iso7816_4.c File Reference

SAM3S8/SD8 Software Package 1.2
Defines | Functions

# iso7816_4.c File Reference

`#include "board.h"`

Go to the source code of this file.

## Defines

#define | CASE1 1
#define | CASE2 2
#define | CASE3 3
#define | USART_SEND 0
#define | USART_RCV 1
#define | BOARD_ISO7816_BASE_USART USART1
#define | BOARD_ISO7816_ID_USART ID_USART1

## Functions

void | ISO7816_IccPowerOff (void)
uint16_t | ISO7816_XfrBlockTPDU_T0 (const uint8_t *pAPDU, uint8_t *pMessage, uint16_t wLength)
void | ISO7816_Escape (void)
void | ISO7816_RestartClock (void)
void | ISO7816_StopClock (void)
void | ISO7816_toAPDU (void)
void | ISO7816_Datablock_ATR (uint8_t *pAtr, uint8_t *pLength)
void | ISO7816_SetDataRateandClockFrequency (uint32_t dwClockFrequency, uint32_t dwDataRate)
uint8_t | ISO7816_StatusReset (void)
void | ISO7816_cold_reset (void)
void | ISO7816_warm_reset (void)
void | ISO7816_Decode_ATR (uint8_t *pAtr)
void | ISO7816_Init (const Pin pPinIso7816RstMC)

## Detailed Description

## Purpose

ISO 7816 driver

## Usage

Explanation on the usage of the code made available through the header file.

Definition in file iso7816_4.c.

## Define Documentation

#define CASE1 1

Case for APDU commands

Definition at line 52 of file iso7816_4.c.

#define USART_SEND 0

Flip flop for send and receive char

Definition at line 57 of file iso7816_4.c.

## Function Documentation

void ISO7816_cold_reset | ( | void | ) |

cold reset

Definition at line 437 of file iso7816_4.c.

void ISO7816_Datablock_ATR | ( | uint8_t * | pAtr,
|  | uint8_t * | pLength
| ) |  |

Answer To Reset (ATR)

Parameters:

  pAtr | ATR buffer
  pLength | Pointer for store the ATR length

Definition at line 357 of file iso7816_4.c.

void ISO7816_Decode_ATR | ( | uint8_t * | pAtr ) |

Decode ATR trace

Parameters:

  pAtr | pointer on ATR buffer

Definition at line 474 of file iso7816_4.c.

void ISO7816_Escape | ( | void | ) |

Escape ISO7816

Definition at line 320 of file iso7816_4.c.

void ISO7816_IccPowerOff | ( | void | ) |

Iso 7816 ICC power off

Definition at line 177 of file iso7816_4.c.

Here is the call graph for this function:

void ISO7816_Init | ( | const Pin | pPinIso7816RstMC ) |

Initializes a ISO driver

Parameters:

  pPinIso7816RstMC | Pin ISO 7816 Rst MC

Definition at line 573 of file iso7816_4.c.

Here is the call graph for this function:

void ISO7816_RestartClock | ( | void | ) |

Restart clock ISO7816

Definition at line 328 of file iso7816_4.c.

void ISO7816_SetDataRateandClockFrequency | ( | uint32_t | dwClockFrequency,
|  | uint32_t | dwDataRate
| ) |  |

Set data rate and clock frequency

Parameters:

  dwClockFrequency | ICC clock frequency in KHz.
  dwDataRate | ICC data rate in bpd

Definition at line 408 of file iso7816_4.c.

uint8_t ISO7816_StatusReset | ( | void | ) |

Pin status for ISO7816 RESET

Returns:
  1 if the Pin RstMC is high; otherwise 0.

Definition at line 429 of file iso7816_4.c.

Here is the call graph for this function:

void ISO7816_StopClock | ( | void | ) |

Stop clock ISO7816

Definition at line 337 of file iso7816_4.c.

void ISO7816_toAPDU | ( | void | ) |

T0 APDU

Definition at line 346 of file iso7816_4.c.

void ISO7816_warm_reset | ( | void | ) |

Warm reset

Definition at line 454 of file iso7816_4.c.

Here is the call graph for this function:

uint16_t ISO7816_XfrBlockTPDU_T0 | ( | const uint8_t * | pAPDU,
|  | uint8_t * | pMessage,
|  | uint16_t | wLength
| ) |  |

Transfert Block TPDU T=0

Parameters:

  pAPDU | APDU buffer
  pMessage | Message buffer
  wLength | Block length

Returns:
  Message index

Definition at line 190 of file iso7816_4.c.

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines