The SmartCard EMVSIM driver covers the transmission functionality in the CPU mode. The driver supports non-blocking (asynchronous) type of data transfers. The blocking (synchronous) transfer is supported only by the RTOS adaptation layer.
|
void | SMARTCARD_EMVSIM_GetDefaultConfig (smartcard_card_params_t *cardParams) |
| Fills in the smartcard_card_params structure with default values according to the EMV 4.3 specification. More...
|
|
status_t | SMARTCARD_EMVSIM_Init (EMVSIM_Type *base, smartcard_context_t *context, uint32_t srcClock_Hz) |
| Initializes an EMVSIM peripheral for the Smart card/ISO-7816 operation. More...
|
|
void | SMARTCARD_EMVSIM_Deinit (EMVSIM_Type *base) |
| This function disables the EMVSIM interrupts, disables the transmitter and receiver, flushes the FIFOs, and gates EMVSIM clock in SIM. More...
|
|
int32_t | SMARTCARD_EMVSIM_GetTransferRemainingBytes (EMVSIM_Type *base, smartcard_context_t *context) |
| Returns whether the previous EMVSIM transfer has finished. More...
|
|
status_t | SMARTCARD_EMVSIM_AbortTransfer (EMVSIM_Type *base, smartcard_context_t *context) |
| Terminates an asynchronous EMVSIM transfer early. More...
|
|
status_t | SMARTCARD_EMVSIM_TransferNonBlocking (EMVSIM_Type *base, smartcard_context_t *context, smartcard_xfer_t *xfer) |
| Transfer data using interrupts. More...
|
|
status_t | SMARTCARD_EMVSIM_Control (EMVSIM_Type *base, smartcard_context_t *context, smartcard_control_t control, uint32_t param) |
| Controls the EMVSIM module per different user request. More...
|
|
void | SMARTCARD_EMVSIM_IRQHandler (EMVSIM_Type *base, smartcard_context_t *context) |
| Handles EMVSIM module interrupts. More...
|
|
Enumerator |
---|
kEMVSIM_GPCClockDisable |
Disabled.
|
kEMVSIM_GPCCardClock |
Card clock.
|
kEMVSIM_GPCRxClock |
Receive clock.
|
kEMVSIM_GPCTxClock |
Transmit ETU clock.
|
Enumerator |
---|
kEMVSIM_DetectOnFallingEdge |
Presence detected on the falling edge.
|
kEMVSIM_DetectOnRisingEdge |
Presence detected on the rising edge.
|
Enumerator |
---|
kEMVSIM_DetectPinIsLow |
Presence detected pin is logic low.
|
kEMVSIM_DetectPinIsHigh |
Presence detected pin is logic high.
|
- Parameters
-
cardParams | The configuration structure of type smartcard_interface_config_t. Function fill in members: Fi = 372; Di = 1; currentD = 1; WI = 0x0A; GTN = 0x00; with default values. |
status_t SMARTCARD_EMVSIM_Init |
( |
EMVSIM_Type * |
base, |
|
|
smartcard_context_t * |
context, |
|
|
uint32_t |
srcClock_Hz |
|
) |
| |
This function un-gates the EMVSIM clock, initializes the module to EMV default settings, configures the IRQ, enables the module-level interrupt to the core and, initializes the driver context.
- Parameters
-
base | The EMVSIM peripheral base address. |
context | A pointer to the smart card driver context structure. |
srcClock_Hz | Smart card clock generation module source clock. |
- Returns
- An error code or kStatus_SMARTCARD_Success.
void SMARTCARD_EMVSIM_Deinit |
( |
EMVSIM_Type * |
base | ) |
|
- Parameters
-
base | The EMVSIM module base address. |
int32_t SMARTCARD_EMVSIM_GetTransferRemainingBytes |
( |
EMVSIM_Type * |
base, |
|
|
smartcard_context_t * |
context |
|
) |
| |
When performing an async transfer, call this function to ascertain the context of the current transfer: in progress (or busy) or complete (success). If the transfer is still in progress, the user can obtain the number of words that have not been transferred.
- Parameters
-
base | The EMVSIM module base address. |
context | A pointer to a smart card driver context structure. |
- Returns
- The number of bytes not transferred.
During an async EMVSIM transfer, the user can terminate the transfer early if the transfer is still in progress.
- Parameters
-
base | The EMVSIM peripheral address. |
context | A pointer to a smart card driver context structure. |
- Return values
-
kStatus_SMARTCARD_Success | The transmit abort was successful. |
kStatus_SMARTCARD_NoTransmitInProgress | No transmission is currently in progress. |
A non-blocking (also known as asynchronous) function means that the function returns immediately after initiating the transfer function. The application has to get the transfer status to see when the transfer is complete. In other words, after calling the non-blocking (asynchronous) transfer function, the application must get the transfer status to check if the transmit is completed or not.
- Parameters
-
base | The EMVSIM peripheral base address. |
context | A pointer to a smart card driver context structure. |
xfer | A pointer to the smart card transfer structure where the linked buffers and sizes are stored. |
- Returns
- An error code or kStatus_SMARTCARD_Success.
- Parameters
-
base | The EMVSIM peripheral base address. |
context | A pointer to a smart card driver context structure. |
control | Control type. |
param | Integer value of specific to control command. |
return kStatus_SMARTCARD_Success in success. return kStatus_SMARTCARD_OtherError in case of error.
- Parameters
-
base | The EMVSIM peripheral base address. |
context | A pointer to a smart card driver context structure. |