RTEMS 6.1-rc2
|
Typedefs | |
typedef enum _emvsim_gpc_clock_select | emvsim_gpc_clock_select_t |
General Purpose Counter clock selections. | |
typedef enum _presence_detect_edge | emvsim_presence_detect_edge_t |
EMVSIM card presence detection edge control. | |
typedef enum _presence_detect_status | emvsim_presence_detect_status_t |
EMVSIM card presence detection status. | |
Enumerations | |
enum | _emvsim_gpc_clock_select { kEMVSIM_GPCClockDisable = 0u , kEMVSIM_GPCCardClock = 1u , kEMVSIM_GPCRxClock = 2u , kEMVSIM_GPCTxClock = 3u } |
General Purpose Counter clock selections. More... | |
enum | _presence_detect_edge { kEMVSIM_DetectOnFallingEdge = 0u , kEMVSIM_DetectOnRisingEdge = 1u } |
EMVSIM card presence detection edge control. More... | |
enum | _presence_detect_status { kEMVSIM_DetectPinIsLow = 0u , kEMVSIM_DetectPinIsHigh = 1u } |
EMVSIM card presence detection status. More... | |
Smart card EMVSIM Driver | |
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. | |
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. | |
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. | |
int32_t | SMARTCARD_EMVSIM_GetTransferRemainingBytes (EMVSIM_Type *base, smartcard_context_t *context) |
Returns whether the previous EMVSIM transfer has finished. | |
status_t | SMARTCARD_EMVSIM_AbortTransfer (EMVSIM_Type *base, smartcard_context_t *context) |
Terminates an asynchronous EMVSIM transfer early. | |
status_t | SMARTCARD_EMVSIM_TransferNonBlocking (EMVSIM_Type *base, smartcard_context_t *context, smartcard_xfer_t *xfer) |
Transfer data using interrupts. | |
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. | |
void | SMARTCARD_EMVSIM_IRQHandler (EMVSIM_Type *base, smartcard_context_t *context) |
Handles EMVSIM module interrupts. | |
status_t SMARTCARD_EMVSIM_AbortTransfer | ( | EMVSIM_Type * | base, |
smartcard_context_t * | context | ||
) |
Terminates an asynchronous EMVSIM transfer early.
During an async EMVSIM transfer, the user can terminate the transfer early if the transfer is still in progress.
base | The EMVSIM peripheral address. |
context | A pointer to a smart card driver context structure. |
kStatus_SMARTCARD_Success | The transmit abort was successful. |
kStatus_SMARTCARD_NoTransmitInProgress | No transmission is currently in progress. |
brief Terminates an asynchronous EMVSIM transfer early.
During an async EMVSIM transfer, the user can terminate the transfer early if the transfer is still in progress.
param base The EMVSIM peripheral address. param context A pointer to a smart card driver context structure. retval kStatus_SMARTCARD_Success The transmit abort was successful. retval kStatus_SMARTCARD_NoTransmitInProgress No transmission is currently in progress.
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.
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.
brief Controls the EMVSIM module per different user request.
param base The EMVSIM peripheral base address. param context A pointer to a smart card driver context structure. param control Control type. param param Integer value of specific to control command.
return kStatus_SMARTCARD_Success in success. return kStatus_SMARTCARD_OtherError in case of error.
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.
base | The EMVSIM module base address. |
brief This function disables the EMVSIM interrupts, disables the transmitter and receiver, flushes the FIFOs, and gates EMVSIM clock in SIM.
param base The EMVSIM module base address.
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.
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. |
brief Fills in the smartcard_card_params structure with default values according to the EMV 4.3 specification.
param 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.
int32_t SMARTCARD_EMVSIM_GetTransferRemainingBytes | ( | EMVSIM_Type * | base, |
smartcard_context_t * | context | ||
) |
Returns whether the previous EMVSIM transfer has finished.
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.
base | The EMVSIM module base address. |
context | A pointer to a smart card driver context structure. |
brief Returns whether the previous EMVSIM transfer has finished.
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.
param base The EMVSIM module base address. param context A pointer to a smart card driver context structure.
return The number of bytes not transferred.
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.
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.
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. |
brief Initializes an EMVSIM peripheral for the Smart card/ISO-7816 operation.
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.
param base The EMVSIM peripheral base address. param context A pointer to the smart card driver context structure. param srcClock_Hz Smart card clock generation module source clock.
return An error code or kStatus_SMARTCARD_Success.
void SMARTCARD_EMVSIM_IRQHandler | ( | EMVSIM_Type * | base, |
smartcard_context_t * | context | ||
) |
Handles EMVSIM module interrupts.
base | The EMVSIM peripheral base address. |
context | A pointer to a smart card driver context structure. |
brief Handles EMVSIM module interrupts.
param base The EMVSIM peripheral base address. param context A pointer to a smart card driver context structure.
status_t SMARTCARD_EMVSIM_TransferNonBlocking | ( | EMVSIM_Type * | base, |
smartcard_context_t * | context, | ||
smartcard_xfer_t * | xfer | ||
) |
Transfer data using interrupts.
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.
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. |
brief Transfer data using interrupts.
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.
param base The EMVSIM peripheral base address. param context A pointer to a smart card driver context structure. param xfer A pointer to the smart card transfer structure where the linked buffers and sizes are stored.
return An error code or kStatus_SMARTCARD_Success.