| NUC472_NUC442_BSP V3.04.000 The Board Support Package for NUC472/NUC442

Data Structures | Macros | Functions
sclib.h File Reference

Smartcard library header file. More...

`#include "NUC472_442.h"`
Include dependency graph for sclib.h:

Go to the source code of this file.

## Data Structures
struct | SCLIB_CARD_INFO_T
| A structure holds smartcard information. More...

## Macros
#define | __WEAK __attribute__((weak))
#define | SCLIB_MAX_ATR_LEN
| Max ATR length. ISO-7816 8.2.1. More...
#define | SCLIB_MIN_ATR_LEN
| Min ATR length, TS and T0. More...
#define | SCLIB_PROTOCOL_UNDEFINED
| There is no active protocol. More...
#define | SCLIB_PROTOCOL_T0
| T=0 is the active protocol. More...
#define | SCLIB_PROTOCOL_T1
| T=1 is the active protocol. More...
#define | SCLIB_SUCCESS
| Command successful without error. More...
#define | SCLIB_ERR_CARD_REMOVED
| Smartcard removed. More...
#define | SCLIB_ERR_OVER_RUN
| Rx FIFO over run. More...
#define | SCLIB_ERR_PARITY_ERROR
| Tx/Rx parity error. More...
#define | SCLIB_ERR_NO_STOP
| Stop bit not found. More...
#define | SCLIB_ERR_SILENT_BYTE
| I/O pin stay at low for longer than 1 character time. More...
#define | SCLIB_ERR_READ
| Smartcard read error. More...
#define | SCLIB_ERR_WRITE
| Smartcard write error. More...
#define | SCLIB_ERR_TIME0OUT
| Smartcard timer 0 timeout. More...
#define | SCLIB_ERR_TIME1OUT
| Smartcard timer 1 timeout. More...
#define | SCLIB_ERR_TIME2OUT
| Smartcard timer 2 timeout. More...
#define | SCLIB_ERR_AUTOCONVENTION
| Smartcard is neither direct nor inverse convention. More...
#define | SCLIB_ERR_CLOCK
| Smartcard clock frequency is not between 1MHz and 5 MHz. More...
#define | SCLIB_ERR_ATR_UNRECOGNIZED
| Unrecognised ATR. More...
#define | SCLIB_ERR_ATR_INVALID_PARAM
| ATR parsing interface bytes error. More...
#define | SCLIB_ERR_ATR_INVALID_TCK
| TCK check byte error. More...
#define | SCLIB_ERR_PPS
| PPS error. More...
#define | SCLIB_ERR_T1_PROTOCOL
| T=1 Protocol Error. More...
#define | SCLIB_ERR_T1_ABORT_RECEIVED
| Received ABORT request. More...
#define | SCLIB_ERR_T1_RESYNCH_RECEIVED
| Received RESYNCH request. More...
#define | SCLIB_ERR_T1_VPP_ERROR_RECEIVED
| Received VPP error. More...
#define | SCLIB_ERR_T1_WTXRES_RECEIVED
| Received BWT extension request. More...
#define | SCLIB_ERR_T1_IFSRES_RECEIVED
| Received max IFS offer. More...
#define | SCLIB_ERR_T1_ABORTRES_RECEIVED
| Received ABORT response. More...
#define | SCLIB_ERR_T1_CHECKSUM
| T=1 block check sum error. More...
#define | SCLIB_ERR_T0_PROTOCOL
| T=0 Protocol Error. More...
#define | SCLIB_ERR_DEACTIVE
| Smartcard is deactivate. More...
#define | SCLIB_ERR_CARDBUSY
| Smartcard is busy, previous transmission is not complete yet. More...

## Functions
int32_t | SCLIB_Activate (uint32_t num, uint32_t u32EMVCheck)
| Activate a smartcard. More...
int32_t | SCLIB_ActivateDelay (uint32_t num, uint32_t u32EMVCheck, uint32_t u32Delay)
| Activate a smartcard with large delay between set VCC high and start CLK output. More...
int32_t | SCLIB_ColdReset (uint32_t num)
| Cold reset a smartcard. More...
int32_t | SCLIB_WarmReset (uint32_t num)
| Warm reset a smartcard. More...
void | SCLIB_Deactivate (uint32_t num)
| Deactivate a smartcard. More...
int32_t | SCLIB_GetCardInfo (uint32_t num, SCLIB_CARD_INFO_T *s_info)
| Get the card information (e.g., protocol selected, ATR...) after activation success. More...
int32_t | SCLIB_StartTransmission (uint32_t num, uint8_t *cmdBuf, uint32_t cmdLen, uint8_t *rspBuf, uint32_t *rspLen)
| Start a smartcard transmission. More...
int32_t | SCLIB_SetIFSD (uint32_t num, uint8_t size)
| Set interface device max information field size (IFSD) More...
__WEAK void | SCLIB_RequestTimeExtension (uint32_t u32Protocol)
| A callback called by library while smartcard request for a time extension. More...
uint32_t | SCLIB_CheckCDEvent (uint32_t num)
| Process card detect event in IRQ handler. More...
uint32_t | SCLIB_CheckTimeOutEvent (uint32_t num)
| Process time out event in IRQ handler. More...
uint32_t | SCLIB_CheckTxRxEvent (uint32_t num)
| Process card transmission event in IRQ handler. More...
uint32_t | SCLIB_CheckErrorEvent (uint32_t num)
| Process error event in IRQ handler. More...

## Detailed Description

Smartcard library header file.

Version
  V1.00

Revision
  6

Date
  15/05/05 3:33p

Note
  SPDX-License-Identifier: Apache-2.0 Copyright (C) 2013 Nuvoton Technology Corp. All rights reserved.

Definition in file sclib.h.

## Macro Definition Documentation

## ◆ __WEAK

#define __WEAK __attribute__((weak))

Definition at line 18 of file sclib.h.