#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_RECEIVE 1 |
#define | USART7816BAUDRATE 9600 |
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 (Usart *pUsart, uint32_t usartId, const Pin pPinIso7816RstMC) |
ISO 7816 driver
Explanation on the usage of the code made available through the header file.
Definition in file iso7816_4.c.
#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.
void ISO7816_cold_reset | ( | void | ) |
cold reset
Definition at line 425 of file iso7816_4.c.
void ISO7816_Datablock_ATR | ( | uint8_t * | pAtr, | |
uint8_t * | pLength | |||
) |
Answer To Reset (ATR)
pAtr | ATR buffer | |
pLength | Pointer for store the ATR length |
Definition at line 346 of file iso7816_4.c.
void ISO7816_Decode_ATR | ( | uint8_t * | pAtr | ) |
void ISO7816_Escape | ( | void | ) |
Escape ISO7816
Definition at line 309 of file iso7816_4.c.
void ISO7816_IccPowerOff | ( | void | ) |
Iso 7816 ICC power off
Definition at line 175 of file iso7816_4.c.
Initializes a ISO driver
pUsart | Pointer to the USART peripheral to configure. | |
usartId | USART ID for iso7816 | |
pPinIso7816RstMC | Pin ISO 7816 Rst MC |
Definition at line 558 of file iso7816_4.c.
void ISO7816_RestartClock | ( | void | ) |
Restart clock ISO7816
Definition at line 317 of file iso7816_4.c.
void ISO7816_SetDataRateandClockFrequency | ( | uint32_t | dwClockFrequency, | |
uint32_t | dwDataRate | |||
) |
Set data rate and clock frequency
dwClockFrequency | ICC clock frequency in KHz. | |
dwDataRate | ICC data rate in bpd |
Definition at line 395 of file iso7816_4.c.
uint8_t ISO7816_StatusReset | ( | void | ) |
Pin status for ISO7816 RESET
Definition at line 417 of file iso7816_4.c.
void ISO7816_StopClock | ( | void | ) |
Stop clock ISO7816
Definition at line 326 of file iso7816_4.c.
void ISO7816_toAPDU | ( | void | ) |
T0 APDU
Definition at line 335 of file iso7816_4.c.
void ISO7816_warm_reset | ( | void | ) |
uint16_t ISO7816_XfrBlockTPDU_T0 | ( | const uint8_t * | pAPDU, | |
uint8_t * | pMessage, | |||
uint16_t | wLength | |||
) |
Transfer Block TPDU T=0
pAPDU | APDU buffer | |
pMessage | Message buffer | |
wLength | Block length |
Definition at line 188 of file iso7816_4.c.