RTEMS 6.1-rc2
|
Data Structures | |
struct | _smartcard_card_params |
Defines card-specific parameters for Smart card driver. More... | |
struct | _smartcard_timers_state |
Smart card defines the state of the EMV timers in the Smart card driver. More... | |
struct | _smartcard_interface_config |
Defines user specified configuration of Smart card interface. More... | |
struct | _smartcard_xfer |
Defines user transfer structure used to initialize transfer. More... | |
struct | _smartcard_context |
Runtime state of the Smart card driver. More... | |
Driver version | |
enum | { kStatus_SMARTCARD_Success = MAKE_STATUS(kStatusGroup_SMARTCARD, 0) , kStatus_SMARTCARD_TxBusy = MAKE_STATUS(kStatusGroup_SMARTCARD, 1) , kStatus_SMARTCARD_RxBusy = MAKE_STATUS(kStatusGroup_SMARTCARD, 2) , kStatus_SMARTCARD_NoTransferInProgress = MAKE_STATUS(kStatusGroup_SMARTCARD, 3) , kStatus_SMARTCARD_Timeout = MAKE_STATUS(kStatusGroup_SMARTCARD, 4) , kStatus_SMARTCARD_Initialized , kStatus_SMARTCARD_PhyInitialized , kStatus_SMARTCARD_CardNotActivated = MAKE_STATUS(kStatusGroup_SMARTCARD, 7) , kStatus_SMARTCARD_InvalidInput , kStatus_SMARTCARD_OtherError = MAKE_STATUS(kStatusGroup_SMARTCARD, 9) } |
Smart card Error codes. More... | |
enum | _smartcard_control { kSMARTCARD_EnableADT = 0x0u , kSMARTCARD_DisableADT = 0x1u , kSMARTCARD_EnableGTV = 0x2u , kSMARTCARD_DisableGTV = 0x3u , kSMARTCARD_ResetWWT = 0x4u , kSMARTCARD_EnableWWT = 0x5u , kSMARTCARD_DisableWWT = 0x6u , kSMARTCARD_ResetCWT = 0x7u , kSMARTCARD_EnableCWT = 0x8u , kSMARTCARD_DisableCWT = 0x9u , kSMARTCARD_ResetBWT = 0xAu , kSMARTCARD_EnableBWT = 0xBu , kSMARTCARD_DisableBWT = 0xCu , kSMARTCARD_EnableInitDetect = 0xDu , kSMARTCARD_EnableAnack = 0xEu , kSMARTCARD_DisableAnack = 0xFu , kSMARTCARD_ConfigureBaudrate = 0x10u , kSMARTCARD_SetupATRMode = 0x11u , kSMARTCARD_SetupT0Mode = 0x12u , kSMARTCARD_SetupT1Mode = 0x13u , kSMARTCARD_EnableReceiverMode = 0x14u , kSMARTCARD_DisableReceiverMode = 0x15u , kSMARTCARD_EnableTransmitterMode = 0x16u , kSMARTCARD_DisableTransmitterMode = 0x17u , kSMARTCARD_ResetWaitTimeMultiplier = 0x18u } |
Control codes for the Smart card protocol timers and misc. | |
enum | _smartcard_card_voltage_class { kSMARTCARD_VoltageClassUnknown = 0x0u , kSMARTCARD_VoltageClassA5_0V = 0x1u , kSMARTCARD_VoltageClassB3_3V = 0x2u , kSMARTCARD_VoltageClassC1_8V = 0x3u } |
Defines Smart card interface voltage class values. | |
enum | _smartcard_transfer_state { kSMARTCARD_IdleState = 0x0u , kSMARTCARD_WaitingForTSState = 0x1u , kSMARTCARD_InvalidTSDetecetedState = 0x2u , kSMARTCARD_ReceivingState = 0x3u , kSMARTCARD_TransmittingState = 0x4u } |
Defines Smart card I/O transfer states. | |
enum | _smartcard_reset_type { kSMARTCARD_ColdReset = 0x0u , kSMARTCARD_WarmReset = 0x1u , kSMARTCARD_NoColdReset = 0x2u , kSMARTCARD_NoWarmReset = 0x3u } |
Defines Smart card reset types. | |
enum | _smartcard_transport_type { kSMARTCARD_T0Transport = 0x0u , kSMARTCARD_T1Transport = 0x1u } |
Defines Smart card transport protocol types. | |
enum | _smartcard_parity_type { kSMARTCARD_EvenParity = 0x0u , kSMARTCARD_OddParity = 0x1u } |
Defines Smart card data parity types. | |
enum | _smartcard_card_convention { kSMARTCARD_DirectConvention = 0x0u , kSMARTCARD_InverseConvention = 0x1u } |
Defines data Convention format. | |
enum | _smartcard_interface_control { kSMARTCARD_InterfaceSetVcc = 0x00u , kSMARTCARD_InterfaceSetClockToResetDelay = 0x01u , kSMARTCARD_InterfaceReadStatus = 0x02u } |
Defines Smart card interface IC control types. | |
enum | _smartcard_direction { kSMARTCARD_Receive = 0u , kSMARTCARD_Transmit = 1u } |
Defines transfer direction. | |
typedef enum _smartcard_control | smartcard_control_t |
Control codes for the Smart card protocol timers and misc. | |
typedef enum _smartcard_card_voltage_class | smartcard_card_voltage_class_t |
Defines Smart card interface voltage class values. | |
typedef enum _smartcard_transfer_state | smartcard_transfer_state_t |
Defines Smart card I/O transfer states. | |
typedef enum _smartcard_reset_type | smartcard_reset_type_t |
Defines Smart card reset types. | |
typedef enum _smartcard_transport_type | smartcard_transport_type_t |
Defines Smart card transport protocol types. | |
typedef enum _smartcard_parity_type | smartcard_parity_type_t |
Defines Smart card data parity types. | |
typedef enum _smartcard_card_convention | smartcard_card_convention_t |
Defines data Convention format. | |
typedef enum _smartcard_interface_control | smartcard_interface_control_t |
Defines Smart card interface IC control types. | |
typedef enum _smartcard_direction | smartcard_direction_t |
Defines transfer direction. | |
typedef void(* | smartcard_interface_callback_t) (void *smartcardContext, void *param) |
Smart card interface interrupt callback function type. | |
typedef void(* | smartcard_transfer_callback_t) (void *smartcardContext, void *param) |
Smart card transfer interrupt callback function type. | |
typedef void(* | smartcard_time_delay_t) (uint32_t us) |
Time Delay function used to passive waiting using RTOS [us]. | |
typedef struct _smartcard_card_params | smartcard_card_params_t |
Defines card-specific parameters for Smart card driver. | |
typedef struct _smartcard_timers_state | smartcard_timers_state_t |
Smart card defines the state of the EMV timers in the Smart card driver. | |
typedef struct _smartcard_interface_config | smartcard_interface_config_t |
Defines user specified configuration of Smart card interface. | |
typedef struct _smartcard_xfer | smartcard_xfer_t |
Defines user transfer structure used to initialize transfer. | |
typedef struct _smartcard_context | smartcard_context_t |
Runtime state of the Smart card driver. | |
#define | FSL_SMARTCARD_DRIVER_VERSION (MAKE_VERSION(2, 2, 2)) |
Smart card driver version 2.2.2. | |
#define | SMARTCARD_INIT_DELAY_CLOCK_CYCLES (42000u) |
Smart card global define which specify number of clock cycles until initial 'TS' character has to be received. | |
#define | SMARTCARD_EMV_ATR_DURATION_ETU (20150u) |
Smart card global define which specify number of clock cycles during which ATR string has to be received. | |
#define | SMARTCARD_TS_DIRECT_CONVENTION (0x3Bu) |
Smart card specification initial TS character definition of direct convention. | |
#define | SMARTCARD_TS_INVERSE_CONVENTION (0x3Fu) |
Smart card specification initial TS character definition of inverse convention. | |
anonymous enum |
Smart card Error codes.
bool _smartcard_context::abortTransfer |
Used to abort transfer.
bool _smartcard_card_params::active |
Indicates if the smart card is activated
volatile bool _smartcard_timers_state::adtExpired |
Indicates whether ADT timer expired
bool _smartcard_card_params::atrComplete |
Indicates whether the ATR received from the card was complete or not
bool _smartcard_card_params::atrValid |
Indicates whether the ATR received from the card was valid or not
void* _smartcard_context::base |
Smart card module base address
uint8_t _smartcard_card_params::BGI |
4 bits BGI - block guard time integer
uint8_t* _smartcard_xfer::buff |
The buffer of data.
uint8_t _smartcard_card_params::BWI |
4 bits BWI - block wait time integer
volatile bool _smartcard_timers_state::bwtExpired |
Indicates whether BWT timer expired
smartcard_card_params_t _smartcard_context::cardParams |
Smart card parameters(ATR and current) and interface slots states(ATR and current)
uint8_t _smartcard_interface_config::clockModule |
Smart card clock module number
uint8_t _smartcard_interface_config::clockModuleChannel |
Smart card clock module channel number
uint8_t _smartcard_interface_config::clockModuleSourceClock |
Smart card clock module source clock [e.g., BusClk]
uint32_t _smartcard_interface_config::clockToResetDelay |
Indicates clock to RST apply delay [smart card clock cycles]
uint8_t _smartcard_interface_config::controlPin |
Smart card PHY control pin instance
uint8_t _smartcard_interface_config::controlPort |
Smart card PHY control port instance
smartcard_card_convention_t _smartcard_card_params::convention |
Card convention, kSMARTCARD_DirectConvention for direct convention, kSMARTCARD_InverseConvention for inverse convention
uint8_t _smartcard_card_params::currentD |
4 bits DI - current baud rate divisor
uint8_t _smartcard_card_params::CWI |
4 bits CWI - character wait time integer
volatile bool _smartcard_timers_state::cwtExpired |
Indicates whether CWT timer expired
uint8_t _smartcard_interface_config::dataPin |
Smart card PHY data pin instance
uint8_t _smartcard_interface_config::dataPinMux |
Smart card PHY data pin mux option
uint8_t _smartcard_interface_config::dataPort |
Smart card PHY data port instance
uint8_t _smartcard_card_params::Di |
4 bits DI - baud rate divisor
smartcard_direction_t _smartcard_xfer::direction |
Direction of communication. (RX/TX)
smartcard_direction_t _smartcard_context::direction |
Direction of communication. (RX/TX)
bool _smartcard_card_params::faulty |
Indicates whether smart card/interface is faulty
uint16_t _smartcard_card_params::Fi |
4 bits Fi - clock rate conversion integer
uint8_t _smartcard_card_params::fMax |
Maximum Smart card frequency in MHz
uint8_t _smartcard_card_params::GTN |
8 bits GTN - extended guard time integer
uint8_t _smartcard_card_params::IFSC |
Indicates IFSC value of the card
uint8_t _smartcard_context::IFSD |
Indicates the terminal IFSD
volatile bool _smartcard_timers_state::initCharTimerExpired |
Indicates whether reception timer for initialization character (TS) after the RST has expired
smartcard_interface_callback_t _smartcard_context::interfaceCallback |
Callback to invoke after interface IC raised interrupt.
void* _smartcard_context::interfaceCallbackParam |
Interface callback parameter pointer.
smartcard_interface_config_t _smartcard_context::interfaceConfig |
Smart card interface configuration structure
uint8_t _smartcard_interface_config::irqPin |
Smart card PHY Interrupt pin instance
uint8_t _smartcard_interface_config::irqPort |
Smart card PHY Interrupt port instance
uint8_t _smartcard_card_params::modeNegotiable |
Indicates if the card acts in negotiable or a specific mode.
smartcard_parity_type_t _smartcard_context::parity |
Indicates current parity even/odd
volatile bool _smartcard_context::parityError |
Indicates whether a parity error has been detected
bool _smartcard_card_params::present |
Indicates if a smart card is present
uint8_t _smartcard_interface_config::resetPin |
Smart card reset pin instance
uint8_t _smartcard_interface_config::resetPort |
Smart card reset port instance
smartcard_reset_type_t _smartcard_context::resetType |
Indicates whether a Cold reset or Warm reset was requested.
uint8_t _smartcard_context::rxFifoThreshold |
The max value of the receiver FIFO threshold.
volatile bool _smartcard_context::rxtCrossed |
Indicates whether RXT thresholds has been crossed
size_t _smartcard_xfer::size |
The number of transferred units.
uint32_t _smartcard_interface_config::smartCardClock |
Smart card interface clock [Hz]
uint8_t _smartcard_card_params::status |
Indicates smart card status
uint8_t _smartcard_context::statusBytes[2] |
Used to store Status bytes SW1, SW2 of the last executed card command response
bool _smartcard_card_params::t0Indicated |
Indicates ff T=0 indicated in TD1 byte
bool _smartcard_card_params::t1Indicated |
Indicates if T=1 indicated in TD2 byte
smartcard_time_delay_t _smartcard_context::timeDelay |
Function which handles time delay defined by user or RTOS.
smartcard_timers_state_t _smartcard_context::timersState |
Indicates the state of different protocol timers used in driver
smartcard_transfer_callback_t _smartcard_context::transferCallback |
Callback to invoke after transfer event occur.
void* _smartcard_context::transferCallbackParam |
Transfer callback parameter pointer.
volatile smartcard_transfer_state_t _smartcard_context::transferState |
Indicates the current transfer state
uint8_t _smartcard_interface_config::tsTimerId |
Numerical identifier of the External HW timer for Initial character detection
smartcard_transport_type_t _smartcard_context::tType |
Indicates current transfer protocol (T0 or T1)
uint8_t _smartcard_context::txFifoEntryCount |
Number of data word entries in transmit FIFO.
volatile bool _smartcard_context::txtCrossed |
Indicates whether TXT thresholds has been crossed
smartcard_card_voltage_class_t _smartcard_interface_config::vcc |
Smart card voltage class
uint8_t _smartcard_interface_config::vsel0Pin |
Smart card PHY Vsel0 control pin instance
uint8_t _smartcard_interface_config::vsel0Port |
Smart card PHY Vsel0 control port instance
uint8_t _smartcard_interface_config::vsel1Pin |
Smart card PHY Vsel1 control pin instance
uint8_t _smartcard_interface_config::vsel1Port |
Smart card PHY Vsel1 control port instance
uint8_t _smartcard_card_params::WI |
8 bits WI - work wait time integer
volatile bool _smartcard_context::wtxRequested |
Indicates whether WTX has been requested or not
volatile bool _smartcard_timers_state::wwtExpired |
Indicates whether WWT timer expired
uint8_t* _smartcard_context::xBuff |
The buffer of data being transferred.
volatile bool _smartcard_context::xIsBusy |
True if there is an active transfer.
volatile size_t _smartcard_context::xSize |
The number of bytes to be transferred.