Kinetis SDK v.1.3 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
EMVSIM HAL driver

Overview

This section describes the programming interface of the EMVSIM HAL driver.

Files

file  fsl_emvsim_hal.h
 

Enumerations

enum  emvsim_module_param_t {
  kEmvsimParamVersion = 0U,
  kEmvsimParamTxFifoSize = 1U,
  kEmvsimParamRxFifoSize = 2U
}
 Module basic parameter selections. More...
 
enum  emvsim_gpc_clock_select_t {
  kEmvsimGPCClockDisable = 0U,
  kEmvsimGPCCardClock = 1U,
  kEmvsimGPCRxClock = 2U,
  kEmvsimGPCTxClock = 3U
}
 General Purpose Counter clock selections. More...
 
enum  emvsim_crc_flip_control_t {
  kEmvsimCrcNoFlip = 0U,
  kEmvsimCrcFlip = 1U
}
 CRC bit flip control. More...
 
enum  emvsim_crc_inv_control_t {
  kEmvsimCrcNoInv = 0U,
  kEmvsimCrcInv = 1U
}
 CRC bit inversion control. More...
 
enum  emvsim_stop_clock_control_t {
  kEmvsimStopDownAllClocks = 0U,
  kEmvsimStopDownAllButCardClock = 1U
}
 EMVSIM STOP instruction clock control. More...
 
enum  emvsim_doze_clock_control_t {
  kEmvsimDozeDownAllClocks = 0U,
  kEmvsimDozeDownNoClocks = 1U
}
 EMVSIM DOZE instruction clock control. More...
 
enum  emvsim_data_convention_t {
  kEmvsimDirectConvention = 0U,
  kEmvsimInverseConvention = 1U
}
 EMVSIM data convention. More...
 
enum  emvsim_character_mode_t {
  kEmvsimCharacter12EtuMode = 0U,
  kEmvsimCharacter11EtuMode = 1U
}
 EMVSIM character mode. More...
 
enum  emvsim_control_t {
  kEmvsimCtrlInverseConvention = 0U,
  kEmvsimCtrlinitialCharacterMode = 1U,
  kEmvsimCtrlANACKEnable = 2U,
  kEmvsimCtrlONACKEnable = 3U,
  kEmvsimCtrlFlushRx = 8U,
  kEmvsimCtrlFlushTx = 9U,
  kEmvsimCtrlSwRst = 10U,
  kEmvsimCtrlKillClocks = 11U,
  kEmvsimCtrlDozeEnable = 12U,
  kEmvsimCtrlStopEnable = 13U,
  kEmvsimCtrlReceiverEnable = 16U,
  kEmvsimCtrlTransmitterEnable = 17U,
  kEmvsimCtrlRcvr11ModeEnable = 18U,
  kEmvsimCtrlRxDmaEnable = 19U,
  kEmvsimCtrlTxDmaEnable = 20U,
  kEmvsimCtrlInvertCrcOutput = 24U,
  kEmvsimCtrlFlipCrcOutput = 25U,
  kEmvsimCtrlFlipCrcInput = 26U,
  kEmvsimCtrlCWTEnable = 27U,
  kEmvsimCtrlLrcEnable = 28U,
  kEmvsimCtrlCrcEnable = 29U,
  kEmvsimCtrlXmtCrcOrLrcEnable = 30U,
  kEmvsimCtrlBWTEnable = 31U
}
 EMVSIM Control functions. More...
 
enum  emvsim_interrupt_t {
  kEmvsimIntRxData = 0U,
  kEmvsimIntGPCnt1 = 1U,
  kEmvsimIntBGTErr = 2U,
  kEmvsimIntBWTErr = 3U,
  kEmvsimIntRxNackThreshold = 4U,
  kEmvsimIntCWTErr = 5U,
  kEmvsimIntGPCnt0 = 6U,
  kEmvsimIntTxDataThreshold = 7U,
  kEmvsimIntTxFIFOFull = 8U,
  kEmvsimIntTxNackThresold = 9U,
  kEmvsimIntTxFIFOEmpty = 10U,
  kEmvsimIntEarlyTxComplete = 11U,
  kEmvsimIntRxFIFOOverflow = 12U,
  kEmvsimIntTxComplete = 13U,
  kEmvsimIntRxDataThreshold = 14U,
  kEmvsimIntPresenceDetect = 15U
}
 EMVSIM interrupt status/reasons. More...
 
enum  emvsim_rx_status_t {
  kEmvsimFrameErr = 0U,
  kEmvsimParityErr = 1U,
  kEmvsimBGTErr = 2U,
  kEmvsimBWTErr = 3U,
  kEmvsimRxNackThresholdErr = 4U,
  kEmvsimCWTErr = 5U,
  kEmvsimCRCCheckOk = 6U,
  kEmvsimLRCCheckOk = 7U,
  kEmvsimRxDataThreshold = 8U,
  kEmvsimRxData = 9U,
  kEmvsimRxDataOverflow = 10U,
  kEmvsimRxAllStatus = 11U
}
 EMVSIM receive status flags. More...
 
enum  emvsim_tx_status_t {
  kEmvsimGPCNT1Timeout = 0U,
  kEmvsimGPCNT0Timeout = 1U,
  kEmvsimTxDataThreshold = 2U,
  kEmvsimTxFIFOFull = 3U,
  kEmvsimTxComplete = 4U,
  kEmvsimEarlyTxComplete = 5U,
  kEmvsimTxFIFOEmpty = 6U,
  kEmvsimTxNackThresholdErr = 7U,
  kEmvsimTxAllStatus = 8U
}
 EMVSIM transmit status flags. More...
 
enum  emvsim_presence_detect_edge_t {
  kEmvsimPDOnFallingEdge = 0U,
  kEmvsimPDOnRisingEdge = 1U
}
 EMVSIM card presence detection edge control. More...
 
enum  emvsim_presence_detect_status_t {
  kEmvsimPDPinIsLow = 0U,
  kEmvsimPDPinIsHigh = 1U
}
 EMVSIM card presence detection status. More...
 
enum  emvsim_card_clock_stop_polarity_t {
  kEmvsimCardClockStopPolarityIsLow = 0U,
  kEmvsimCardClockStopPolarityIsHigh = 1U
}
 EMVSIM card clock polarity control when card clock is disabled. More...
 
enum  emvsim_reset_card_t {
  kEmvsimResetAssert = 0U,
  kEmvsimResetDeassert = 1U
}
 EMVSIM card reset control. More...
 
enum  emvsim_vcc_en_polarity_t {
  kEmvsimVccEnIsHigh = 0U,
  kEmvsimVccEnIsLow = 1U
}
 EMVSIM card voltage enable signal polarity control. More...
 

EMVSIM Common Configurations

void EMVSIM_HAL_Init (EMVSIM_Type *base)
 Initializes the EMVSIM controller. More...
 
uint32_t EMVSIM_HAL_GetModuleParameter (EMVSIM_Type *base, emvsim_module_param_t param)
 Returns the EMVSIM controller version, transmit and receive FIFO sizes. More...
 
static uint8_t EMVSIM_HAL_GetTxFifoSize (EMVSIM_Type *base)
 Returns the EMVSIM controller transmit FIFO size. More...
 
static uint8_t EMVSIM_HAL_GetRxFifoSize (EMVSIM_Type *base)
 Returns the EMVSIM controller receive FIFO size. More...
 
void EMVSIM_HAL_SetGPCClockSelect (EMVSIM_Type *base, uint8_t gpcNumber, emvsim_gpc_clock_select_t gpcClockSel)
 Selects the EMVSIM general purpose counter clock. More...
 
static void EMVSIM_HAL_SetClockPrescaler (EMVSIM_Type *base, uint8_t prescaler)
 Sets the clock prescaler for the EMVSIM controller. More...
 
static void EMVSIM_HAL_SetBaudrateDivisor (EMVSIM_Type *base, uint16_t divisor)
 Sets the baudrate divisor for the EMVSIM controller. More...
 
void EMVSIM_HAL_SetControl (EMVSIM_Type *base, emvsim_control_t control, bool enable)
 Enables/disables different control functions of the EMVSIM controller. More...
 
bool EMVSIM_HAL_GetControl (EMVSIM_Type *base, emvsim_control_t control)
 Returns the current state of different control functions of the EMVSIM controller. More...
 
void EMVSIM_HAL_SetIntMode (EMVSIM_Type *base, emvsim_interrupt_t interrupt, bool enable)
 Enables/disables the EMVSIM controller interrupt reasons to raise an interrupt. More...
 
bool EMVSIM_HAL_GetIntMode (EMVSIM_Type *base, emvsim_interrupt_t interrupt)
 Returns whether different interrupt reasons are masked or unmasked in the EMVSIM controller. More...
 
static void EMVSIM_HAL_SetReceiverNackThreshold (EMVSIM_Type *base, uint8_t rnackThreshold)
 Sets the receiver NACK threshold value of the EMVSIM controller. More...
 
static uint8_t EMVSIM_HAL_GetReceiverNackThreshold (EMVSIM_Type *base)
 Returns the receiver NACK threshold value of the EMVSIM controller. More...
 
static void EMVSIM_HAL_SetReceiverDataThreshold (EMVSIM_Type *base, uint8_t rdt)
 Sets the receiver data threshold value of the EMVSIM controller. More...
 
static uint8_t EMVSIM_HAL_GetReceiverDataThreshold (EMVSIM_Type *base)
 Returns the receiver data threshold value of the EMVSIM controller. More...
 
static void EMVSIM_HAL_SetTransmitterNackThreshold (EMVSIM_Type *base, uint8_t tnackThreshold)
 Sets the transmitter NACK threshold value of the EMVSIM controller. More...
 
static uint8_t EMVSIM_HAL_GetTransmitterNackThreshold (EMVSIM_Type *base)
 Returns the transmitter NACK threshold value of the EMVSIM controller. More...
 
static void EMVSIM_HAL_SetTransmitterDataThreshold (EMVSIM_Type *base, uint8_t tdt)
 Sets the transmitter data threshold value of the EMVSIM controller. More...
 
static uint8_t EMVSIM_HAL_GetTransmitterDataThreshold (EMVSIM_Type *base)
 Returns the transmitter data threshold value of EMVSIM controller. More...
 
static bool EMVSIM_HAL_IsReceiveFifoEmpty (EMVSIM_Type *base)
 Returns the state of the received FIFO (either empty or has bytes to read from EMVSIM controller). More...
 
static bool EMVSIM_HAL_IsTransmitFifoFull (EMVSIM_Type *base)
 Returns the state of the transmitted FIFO (either full or bytes can be written into the transmit FIFO of the EMVSIM controller). More...
 
bool EMVSIM_HAL_GetReceiveStatus (EMVSIM_Type *base, emvsim_rx_status_t rxStatus)
 Returns the receive status of the EMVSIM controller. More...
 
void EMVSIM_HAL_ClearReceiveStatus (EMVSIM_Type *base, emvsim_rx_status_t rxStatus)
 Clears the receive status of the EMVSIM controller. More...
 
bool EMVSIM_HAL_GetTransmitStatus (EMVSIM_Type *base, emvsim_tx_status_t txStatus)
 Returns the transmit status of the EMVSIM controller. More...
 
void EMVSIM_HAL_ClearTransmitStatus (EMVSIM_Type *base, emvsim_tx_status_t txStatus)
 Clears the transmit status of the EMVSIM controller. More...
 
static void EMVSIM_HAL_SetCardPresenceDetectEdge (EMVSIM_Type *base, emvsim_presence_detect_edge_t spdes)
 Sets the card presence detection edge of the EMVSIM controller. More...
 
static
emvsim_presence_detect_edge_t 
EMVSIM_HAL_GetCardPresenceDetectEdge (EMVSIM_Type *base)
 Returns the current setting of the card presence detection edge of the EMVSIM controller. More...
 
static
emvsim_presence_detect_status_t 
EMVSIM_HAL_GetCardPresenceDetectPinStatus (EMVSIM_Type *base)
 Returns the card presence detection pin level of the EMVSIM controller. More...
 
static bool EMVSIM_HAL_GetCardPresenceDetectInterruptStatus (EMVSIM_Type *base)
 Returns the card presence detection interrupt status of the EMVSIM controller. More...
 
static void EMVSIM_HAL_ClearCardPresenceDetectInterruptStatus (EMVSIM_Type *base)
 Clears the card presence detection interrupt status of the EMVSIM controller. More...
 
static void EMVSIM_HAL_SetAutoPowerDown (EMVSIM_Type *base, bool spd)
 Enables/disables the auto power down of the EMVSIM controller. More...
 
static bool EMVSIM_HAL_GetAutoPowerDown (EMVSIM_Type *base)
 Returns whether the state of auto power down of the EMVSIM controller. More...
 
static void EMVSIM_HAL_SetCardClockStopPolarity (EMVSIM_Type *base, emvsim_card_clock_stop_polarity_t scsp)
 Sets the clock signal polarity during clock stop of EMVSIM controller. More...
 
static
emvsim_card_clock_stop_polarity_t 
EMVSIM_HAL_GetCardClockStopPolarity (EMVSIM_Type *base)
 Returns the current setting of the clock signal polarity during the clock stop of the EMVSIM controller. More...
 
static void EMVSIM_HAL_EnableCardClock (EMVSIM_Type *base)
 Enables the card clock from the EMVSIM controller. More...
 
static void EMVSIM_HAL_DisableCardClock (EMVSIM_Type *base)
 Disables the card clock from the EMVSIM controller. More...
 
static bool EMVSIM_HAL_IsCardClockEnabled (EMVSIM_Type *base)
 Returns the current setting of the card clock from the EMVSIM controller. More...
 
static void EMVSIM_HAL_ResetCard (EMVSIM_Type *base, emvsim_reset_card_t srst)
 Asserts/de-asserts the card reset signal from the EMVSIM controller. More...
 
static emvsim_reset_card_t EMVSIM_HAL_GetCardResetState (EMVSIM_Type *base)
 Returns whether the card reset signal has been asserted from the EMVSIM controller. More...
 
static void EMVSIM_HAL_SetCardVCCEnablePolarity (EMVSIM_Type *base, emvsim_vcc_en_polarity_t vccenp)
 Sets the polarity of the VCC enable signal from the EMVSIM controller. More...
 
static emvsim_vcc_en_polarity_t EMVSIM_HAL_GetCardVCCEnablePolarity (EMVSIM_Type *base)
 Returns the polarity of the VCC enable signal from the EMVSIM controller. More...
 
static void EMVSIM_HAL_SetVCCEnable (EMVSIM_Type *base, bool svccEnable)
 Controls the state of the VCC enable signal from the EMVSIM controller. More...
 
static bool EMVSIM_HAL_GetVCCEnable (EMVSIM_Type *base)
 Returns the state of the VCC enable signal from the EMVSIM controller. More...
 
static void EMVSIM_HAL_EnableAutoPowerDown (EMVSIM_Type *base)
 Enables the auto power down feature of the EMVSIM controller. More...
 
static void EMVSIM_HAL_DisableAutoPowerDown (EMVSIM_Type *base)
 Disables the auto power down feature of the EMVSIM controller. More...
 
static bool EMVSIM_HAL_IsAutoPowerDownEnabled (EMVSIM_Type *base)
 Returns the current state of the auto power down feature of the EMVSIM controller. More...
 
static void EMVSIM_HAL_GetChar (EMVSIM_Type *base, uint8_t *readData)
 Reads the received data byte from the EMVSIM controller. More...
 
static uint32_t EMVSIM_HAL_GetRxDataRegAddr (EMVSIM_Type *base)
 Returns the address of the receive data byte register of the EMVSIM controller. More...
 
static void EMVSIM_HAL_PutChar (EMVSIM_Type *base, uint8_t writeData)
 Writes a byte data to the transmit data byte of the EMVSIM controller. More...
 
static uint32_t EMVSIM_HAL_GetTxDataRegAddr (EMVSIM_Type *base)
 Returns the address of the transmit data byte register of the EMVSIM controller. More...
 
static void EMVSIM_HAL_SetAdditionalTransmitterGuardTime (EMVSIM_Type *base, uint8_t getu)
 Sets an additional transmitter guard time value of the EMVSIM controller. More...
 
static uint8_t EMVSIM_HAL_GetAdditionalTransmitterGuardTime (EMVSIM_Type *base)
 Returns the current setting of the additional transmitter guard time value of the EMVSIM controller. More...
 
static void EMVSIM_HAL_SetCharacterWaitTime (EMVSIM_Type *base, uint16_t cwt)
 Sets the character wait time value of the EMVSIM controller. More...
 
static uint16_t EMVSIM_HAL_GetCharacterWaitTime (EMVSIM_Type *base)
 Returns the character wait time value of the EMVSIM controller. More...
 
static void EMVSIM_HAL_SetBlockWaitTime (EMVSIM_Type *base, uint32_t bwt)
 Sets the block wait time value of the EMVSIM controller. More...
 
static uint32_t EMVSIM_HAL_GetBlockWaitTime (EMVSIM_Type *base)
 Returns the block wait time value of the EMVSIM controller. More...
 
static void EMVSIM_HAL_SetBlockGuardTime (EMVSIM_Type *base, uint16_t bgt)
 Sets the block guard time value of the EMVSIM controller. More...
 
static uint16_t EMVSIM_HAL_GetBlockGuardTime (EMVSIM_Type *base)
 Returns the block guard time value of the EMVSIM controller. More...
 
void EMVSIM_HAL_SetGPCNTValue (EMVSIM_Type *base, uint8_t gpcntIndex, uint16_t gpcntVal)
 Sets the timeout value of the general purpose counters of the EMVSIM controller. More...
 
uint16_t EMVSIM_HAL_GetGPCNTValue (EMVSIM_Type *base, uint8_t gpcntIndex)
 Returns the timeout value of the general purpose counters of the EMVSIM controller. More...
 

Enumeration Type Documentation

Enumerator
kEmvsimParamVersion 

Module version.

kEmvsimParamTxFifoSize 

Transmit FIFO size.

kEmvsimParamRxFifoSize 

Receive FIFO size.

Enumerator
kEmvsimGPCClockDisable 

Disabled.

kEmvsimGPCCardClock 

Card clock.

kEmvsimGPCRxClock 

Receive clock.

kEmvsimGPCTxClock 

Transmit ETU clock.

Enumerator
kEmvsimCrcNoFlip 

Bits are not reversed.

kEmvsimCrcFlip 

Bits are reversed.

Enumerator
kEmvsimCrcNoInv 

Bits are not inverted.

kEmvsimCrcInv 

Bits are inverted.

Enumerator
kEmvsimStopDownAllClocks 

Shut down all clocks.

kEmvsimStopDownAllButCardClock 

Shut down all but card clock.

Enumerator
kEmvsimDozeDownAllClocks 

Shut down all clocks.

kEmvsimDozeDownNoClocks 

Don't shut down clocks.

Enumerator
kEmvsimDirectConvention 

Direct convention.

kEmvsimInverseConvention 

Inverse convention.

Enumerator
kEmvsimCharacter12EtuMode 

12 ETU character mode

kEmvsimCharacter11EtuMode 

11 ETU character mode

Enumerator
kEmvsimCtrlInverseConvention 

Select direct or inverse convention.

kEmvsimCtrlinitialCharacterMode 

Enable/disable initial character detection.

kEmvsimCtrlANACKEnable 

Enable/disable Auto NACK function.

kEmvsimCtrlONACKEnable 

Enable/disable NACK on Overflow function.

kEmvsimCtrlFlushRx 

Reset receiver or in normal operation.

kEmvsimCtrlFlushTx 

Reset transmitter or in normal operation.

kEmvsimCtrlSwRst 

Reset EMVSIM or in normal operation.

kEmvsimCtrlKillClocks 

Enable/disable EMVSIM input clock.

kEmvsimCtrlDozeEnable 

Enable/disable DOZE instruction effect on clocks.

kEmvsimCtrlStopEnable 

Enable/disable STOP instruction effect on clocks.

kEmvsimCtrlReceiverEnable 

Enable/disable receiver.

kEmvsimCtrlTransmitterEnable 

Enable/disable transmitter.

kEmvsimCtrlRcvr11ModeEnable 

Configure receiver in 12 or 11 etu mode.

kEmvsimCtrlRxDmaEnable 

Enable/disable receiver DMA.

kEmvsimCtrlTxDmaEnable 

Enable/disable transmitter DMA.

kEmvsimCtrlInvertCrcOutput 

Controls CRC output to be inverted or not.

kEmvsimCtrlFlipCrcOutput 

Controls CRC output to be flipped or not.

kEmvsimCtrlFlipCrcInput 

Controls CRC input to be flipped or not.

kEmvsimCtrlCWTEnable 

Enable/disable CWT timer.

kEmvsimCtrlLrcEnable 

Enable/disable LRC operation.

kEmvsimCtrlCrcEnable 

Enable/disable CRC operation.

kEmvsimCtrlXmtCrcOrLrcEnable 

Enable/disable CRC or LRC operation in transmission.

kEmvsimCtrlBWTEnable 

Enable/disable BWT timer.

Enumerator
kEmvsimIntRxData 

Receive data interrupt.

kEmvsimIntGPCnt1 

General purpose counter 1 timeout interrupt.

kEmvsimIntBGTErr 

Block guard time error interrupt.

kEmvsimIntBWTErr 

Block wait time error interrupt.

kEmvsimIntRxNackThreshold 

Receiver NACK threshold interrupt.

kEmvsimIntCWTErr 

Character wait time error interrupt.

kEmvsimIntGPCnt0 

General purpose counter 0 timeout interrupt.

kEmvsimIntTxDataThreshold 

Transmit data threshold interrupt.

kEmvsimIntTxFIFOFull 

Transmit FIFO full interrupt.

kEmvsimIntTxNackThresold 

Transmit NACK threshold interrupt.

kEmvsimIntTxFIFOEmpty 

Transmit FIFO empty interrupt.

kEmvsimIntEarlyTxComplete 

Early transmit complete interrupt.

kEmvsimIntRxFIFOOverflow 

Receive FIFO overflow interrupt.

kEmvsimIntTxComplete 

Transmit complete interrupt.

kEmvsimIntRxDataThreshold 

Receive data threshold interrupt.

kEmvsimIntPresenceDetect 

Card presence detect interrupt.

Enumerator
kEmvsimFrameErr 

Frame error flag.

kEmvsimParityErr 

Parity error flag.

kEmvsimBGTErr 

Block guard time error flag.

kEmvsimBWTErr 

Block wait time error flag.

kEmvsimRxNackThresholdErr 

Received NACK threshold error flag.

kEmvsimCWTErr 

Character wait time error flag.

kEmvsimCRCCheckOk 

CRC check OK flag.

kEmvsimLRCCheckOk 

LRC check OK flag.

kEmvsimRxDataThreshold 

Received data threshold interrupt flag.

kEmvsimRxData 

Receive data interrupt flag.

kEmvsimRxDataOverflow 

Receive data overflow flag.

kEmvsimRxAllStatus 

All receive status flags.

Enumerator
kEmvsimGPCNT1Timeout 

General purpose counter 1 timeout flag.

kEmvsimGPCNT0Timeout 

General purpose counter 0 timeout flag.

kEmvsimTxDataThreshold 

Transmit data threshold flag.

kEmvsimTxFIFOFull 

Transmit FIFO full flag.

kEmvsimTxComplete 

Transmit complete flag.

kEmvsimEarlyTxComplete 

Early transmit complete flag.

kEmvsimTxFIFOEmpty 

Transmit FIFO empty flag.

kEmvsimTxNackThresholdErr 

Transmit NACK threshold error flag.

kEmvsimTxAllStatus 

All transmit status flags.

Enumerator
kEmvsimPDOnFallingEdge 

Presence detected on falling edge.

kEmvsimPDOnRisingEdge 

Presence detected on rising edge.

Enumerator
kEmvsimPDPinIsLow 

Presence detected pin is logic low.

kEmvsimPDPinIsHigh 

Presence detected pin is logic high.

Enumerator
kEmvsimCardClockStopPolarityIsLow 

Card clock stop polarity is logic low.

kEmvsimCardClockStopPolarityIsHigh 

Card clock stop polarity is logic high.

Enumerator
kEmvsimResetAssert 

Smart card reset is assert.

kEmvsimResetDeassert 

Smart card reset de-assert.

Enumerator
kEmvsimVccEnIsHigh 

VCC_EN polarity is active high.

kEmvsimVccEnIsLow 

VCC_EN polarity is active low.

Function Documentation

void EMVSIM_HAL_Init ( EMVSIM_Type *  base)

This function initializes the module to a known state.

Parameters
baseEMVSIM module base pointer.
uint32_t EMVSIM_HAL_GetModuleParameter ( EMVSIM_Type *  base,
emvsim_module_param_t  param 
)

This function returns the EMVSIM controller version and transmit and receive FIFO sizes.

Parameters
baseEMVSIM module base pointer.
paramParameter type.
Returns
Version number, transmit or receive FIFO sizes.
static uint8_t EMVSIM_HAL_GetTxFifoSize ( EMVSIM_Type *  base)
inlinestatic

This function returns the EMVSIM transmit FIFO size.

Parameters
baseEMVSIM module base pointer.
Returns
Transmit FIFO size.
static uint8_t EMVSIM_HAL_GetRxFifoSize ( EMVSIM_Type *  base)
inlinestatic

This function returns the EMVSIM receive FIFO size.

Parameters
baseEMVSIM module base pointer.
Returns
Receive FIFO size.
void EMVSIM_HAL_SetGPCClockSelect ( EMVSIM_Type *  base,
uint8_t  gpcNumber,
emvsim_gpc_clock_select_t  gpcClockSel 
)

This function selects the clock for the general purpose counters.

Parameters
baseEMVSIM module base pointer.
gpcNumberGeneral purpose counter number.
gpcClockSelClock selection input.
static void EMVSIM_HAL_SetClockPrescaler ( EMVSIM_Type *  base,
uint8_t  prescaler 
)
inlinestatic

This function sets the clock prescaler value of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
prescalerClock prescaler value.
static void EMVSIM_HAL_SetBaudrateDivisor ( EMVSIM_Type *  base,
uint16_t  divisor 
)
inlinestatic

This function sets the baudrate divisor value of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
divisorBaudrate divisor value.
void EMVSIM_HAL_SetControl ( EMVSIM_Type *  base,
emvsim_control_t  control,
bool  enable 
)

This function enables/disables different control functions of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
controlControl functions as described in emvsim_control_t
enableEnable/disable control function
bool EMVSIM_HAL_GetControl ( EMVSIM_Type *  base,
emvsim_control_t  control 
)

This function returns the current state of different control functions of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
controlControl functions as described in emvsim_control_t
Returns
true - The control function is enabled false - The control function is disabled
void EMVSIM_HAL_SetIntMode ( EMVSIM_Type *  base,
emvsim_interrupt_t  interrupt,
bool  enable 
)

This function enables/disables the different interrupt reasons of the EMVSIM controller to raise an interrupt.

Parameters
baseEMVSIM module base pointer.
interrupt- interrupt reasons
enabletrue - enable interrupt (unmask) false - disable interrupt (mask)
bool EMVSIM_HAL_GetIntMode ( EMVSIM_Type *  base,
emvsim_interrupt_t  interrupt 
)

This function returns whether different interrupt masks are enabled/disabled for different interrupt reasons of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
interrupt- interrupt reasons
Returns
true - interrupt enabled (unmasked) false - interrupt disabled (masked)
static void EMVSIM_HAL_SetReceiverNackThreshold ( EMVSIM_Type *  base,
uint8_t  rnackThreshold 
)
inlinestatic

This function sets a value for the receiver NACK threshold in the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
rnackThresholdReceiver NACK threshold value
static uint8_t EMVSIM_HAL_GetReceiverNackThreshold ( EMVSIM_Type *  base)
inlinestatic

This function returns the value for the receiver NACK threshold in the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
Returns
Receiver NACK threshold value
static void EMVSIM_HAL_SetReceiverDataThreshold ( EMVSIM_Type *  base,
uint8_t  rdt 
)
inlinestatic

This function sets a value for the receiver data threshold value in the EMVSIM controller, i.e., the number of bytes that must exist in the receive FIFO to trigger the corresponding interrupt flag.

Parameters
baseEMVSIM module base pointer.
rdtReceiver data threshold value
static uint8_t EMVSIM_HAL_GetReceiverDataThreshold ( EMVSIM_Type *  base)
inlinestatic

This function returns the value for the receiver data threshold value in the EMVSIM controller, i.e., the number of bytes that must exist in the receive FIFO to trigger the corresponding interrupt flag.

Parameters
baseEMVSIM module base pointer.
Returns
Receiver data threshold value
static void EMVSIM_HAL_SetTransmitterNackThreshold ( EMVSIM_Type *  base,
uint8_t  tnackThreshold 
)
inlinestatic

This function sets a value for the transmitter NACK threshold value in the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
tnackThresholdTransmitter NACK threshold value
static uint8_t EMVSIM_HAL_GetTransmitterNackThreshold ( EMVSIM_Type *  base)
inlinestatic

This function returns the value for the transmitter NACK threshold value in the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
Returns
Transmitter NACK threshold value
static void EMVSIM_HAL_SetTransmitterDataThreshold ( EMVSIM_Type *  base,
uint8_t  tdt 
)
inlinestatic

This function sets a value for the transmitter data threshold value in the EMVSIM controller, i.e., the the threshold value for the transmit FIFO at which the corresponding interrupt flag is set.

Parameters
baseEMVSIM module base pointer.
tdtTransmitter data threshold value
static uint8_t EMVSIM_HAL_GetTransmitterDataThreshold ( EMVSIM_Type *  base)
inlinestatic

This function returns the value for transmitter data threshold value in the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
Returns
Transmitter data threshold value
static bool EMVSIM_HAL_IsReceiveFifoEmpty ( EMVSIM_Type *  base)
inlinestatic

This function the state of receive FIFO (either empty or has bytes to read from the EMVSIM controller).

Parameters
baseEMVSIM module base pointer.
Returns
true - Receive FIFO is empty false - Receive FIFO has bytes to read.
static bool EMVSIM_HAL_IsTransmitFifoFull ( EMVSIM_Type *  base)
inlinestatic

This function returns the state of the transmitted FIFO (either full or bytes can be written into the transmit FIFO of the EMVSIM controller).

Parameters
baseEMVSIM module base pointer.
Returns
true - Transmit FIFO is full false - Data bytes can be written into transmit FIFO
bool EMVSIM_HAL_GetReceiveStatus ( EMVSIM_Type *  base,
emvsim_rx_status_t  rxStatus 
)

This function returns the receive status of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
rxStatusIndicates a particular receive status information to return.
Returns
true - Indicate the particular receive status is set, false - Indicate the particular receive status is clear
void EMVSIM_HAL_ClearReceiveStatus ( EMVSIM_Type *  base,
emvsim_rx_status_t  rxStatus 
)

This function clears the receive status of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
rxStatusIndicates a particular receive status to clear.
bool EMVSIM_HAL_GetTransmitStatus ( EMVSIM_Type *  base,
emvsim_tx_status_t  txStatus 
)

This function returns the transmit status of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
txStatusIndicates a particular transmit status information to return.
Returns
true - Indicate the particular transmit status is set, false - Indicate the particular transmit status is clear
void EMVSIM_HAL_ClearTransmitStatus ( EMVSIM_Type *  base,
emvsim_tx_status_t  txStatus 
)

This function clears the transmit status of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
txStatusIndicates a particular transmit status to clear.
static void EMVSIM_HAL_SetCardPresenceDetectEdge ( EMVSIM_Type *  base,
emvsim_presence_detect_edge_t  spdes 
)
inlinestatic

This function sets the card presence detection edge of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
spdeskEmvsimPDOnFallingEdge - presence detection on falling edge, kEmvsimPDOnRisingEdge - presence detection on rising edge
static emvsim_presence_detect_edge_t EMVSIM_HAL_GetCardPresenceDetectEdge ( EMVSIM_Type *  base)
inlinestatic

This function returns the current setting of the card presence detection edge of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
Returns
kEmvsimPDOnFallingEdge - presence detection on falling edge, kEmvsimPDOnRisingEdge - presence detection on rising edge
static emvsim_presence_detect_status_t EMVSIM_HAL_GetCardPresenceDetectPinStatus ( EMVSIM_Type *  base)
inlinestatic

This function returns the card presence detection pin level of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
Returns
kEmvsimPDPinIsLow - presence detection pin level is LOW, kEmvsimPDPinIsHigh - presence detection pin level is HIGH
static bool EMVSIM_HAL_GetCardPresenceDetectInterruptStatus ( EMVSIM_Type *  base)
inlinestatic

This function returns the card presence detection interrupt status of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
Returns
true - card presence has been detected, false - card presence has not been detected
static void EMVSIM_HAL_ClearCardPresenceDetectInterruptStatus ( EMVSIM_Type *  base)
inlinestatic

This function clears the card presence detection interrupt status of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
static void EMVSIM_HAL_SetAutoPowerDown ( EMVSIM_Type *  base,
bool  spd 
)
inlinestatic

This function enables/disables the auto power down of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
spdtrue - Start auto power down, false - No effect.
static bool EMVSIM_HAL_GetAutoPowerDown ( EMVSIM_Type *  base)
inlinestatic

This function returns the state of auto power down of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
Returns
true - Auto power down has been started or in progress, false - Auto power down is not activated.
static void EMVSIM_HAL_SetCardClockStopPolarity ( EMVSIM_Type *  base,
emvsim_card_clock_stop_polarity_t  scsp 
)
inlinestatic

This function sets clock signal polarity during clock stop of EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
Returns
scsp kEmvsimCardClockStopPolarityIsLow - clock stop polarity is LOW, kEmvsimCardClockStopPolarityIsHigh - clock stop polarity is HIGH.
static emvsim_card_clock_stop_polarity_t EMVSIM_HAL_GetCardClockStopPolarity ( EMVSIM_Type *  base)
inlinestatic

This function returns the current setting of the clock signal polarity during the clock stop of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
Returns
kEmvsimCardClockStopPolarityIsLow - clock stop polarity is LOW, kEmvsimCardClockStopPolarityIsHigh - clock stop polarity is HIGH.
static void EMVSIM_HAL_EnableCardClock ( EMVSIM_Type *  base)
inlinestatic

This function enables the card clock from the the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
static void EMVSIM_HAL_DisableCardClock ( EMVSIM_Type *  base)
inlinestatic

This function disables the card clock from the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
static bool EMVSIM_HAL_IsCardClockEnabled ( EMVSIM_Type *  base)
inlinestatic

This function returns the current setting of the card clock from the EMVSIM controller, whether it is enabled or disabled.

Parameters
baseEMVSIM module base pointer.
Returns
true - Card clock is enabled, false - Card clock is disabled.
static void EMVSIM_HAL_ResetCard ( EMVSIM_Type *  base,
emvsim_reset_card_t  srst 
)
inlinestatic

This function asserts/de-asserts the card reset signal from the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
srst- kEmvsimResetAssert - Card reset signal is asserted, kEmvsimResetDeassert - Card reset signal is de-asserted.
static emvsim_reset_card_t EMVSIM_HAL_GetCardResetState ( EMVSIM_Type *  base)
inlinestatic

This function returns whether the card reset signal has been asserted/de-asserted from the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
Returns
kEmvsimResetAssert - Card reset signal is asserted, kEmvsimResetDeassert - Card reset signal is de-asserted.
static void EMVSIM_HAL_SetCardVCCEnablePolarity ( EMVSIM_Type *  base,
emvsim_vcc_en_polarity_t  vccenp 
)
inlinestatic

This function sets the polarity of the VCC enable signal from the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
vccenp- kEmvsimVccEnIsHigh - VCC enable signal polarity is HIGH,
  • kEmvsimVccEnIsLow- VCC enable signal polarity is LOW.
static emvsim_vcc_en_polarity_t EMVSIM_HAL_GetCardVCCEnablePolarity ( EMVSIM_Type *  base)
inlinestatic

This function returns the polarity of the VCC enable signal from the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
Returns
kEmvsimVccEnIsHigh - VCC enable signal polarity is HIGH, kEmvsimVccEnIsLow- VCC enable signal polarity is LOW.
static void EMVSIM_HAL_SetVCCEnable ( EMVSIM_Type *  base,
bool  svccEnable 
)
inlinestatic

This function controls the state of the VCC enable signal from the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
svccEnable- true - Smart card voltage is enabled,
  • false - Smart card voltage is disabled.
static bool EMVSIM_HAL_GetVCCEnable ( EMVSIM_Type *  base)
inlinestatic

This function returns the state of the VCC enable signal from the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
Returns
true - Smart card voltage is enabled, false - Smart card voltage is disabled.
static void EMVSIM_HAL_EnableAutoPowerDown ( EMVSIM_Type *  base)
inlinestatic

This function enables the auto power down feature of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
static void EMVSIM_HAL_DisableAutoPowerDown ( EMVSIM_Type *  base)
inlinestatic

This function disables the auto power down feature of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
static bool EMVSIM_HAL_IsAutoPowerDownEnabled ( EMVSIM_Type *  base)
inlinestatic

This function returns the current state of the auto power down feature of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
Returns
true - Auto power down feature is enabled, false - Auto power down feature is disabled.
static void EMVSIM_HAL_GetChar ( EMVSIM_Type *  base,
uint8_t *  readData 
)
inlinestatic

This function reads the byte value from the top of the received FIFO of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
readDataPointer to memory where the read data byte must be stored
static uint32_t EMVSIM_HAL_GetRxDataRegAddr ( EMVSIM_Type *  base)
inlinestatic

This function returns the address of the receive data byte register of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
Returns
Address of receive data register
static void EMVSIM_HAL_PutChar ( EMVSIM_Type *  base,
uint8_t  writeData 
)
inlinestatic

This function writes a data byte to the transmit data FIFO of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
writeDataData byte value to be written to transmit data FIFO
static uint32_t EMVSIM_HAL_GetTxDataRegAddr ( EMVSIM_Type *  base)
inlinestatic

This function returns the address of the transmit data byte register of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
Returns
Address of transmit data register
static void EMVSIM_HAL_SetAdditionalTransmitterGuardTime ( EMVSIM_Type *  base,
uint8_t  getu 
)
inlinestatic

This function sets an additional transmitter guard time value of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
getuAdditional ETU guard time to be inserted between bytes to be transmitted
static uint8_t EMVSIM_HAL_GetAdditionalTransmitterGuardTime ( EMVSIM_Type *  base)
inlinestatic

This function returns the currently set value of the additional transmitter guard time of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
Returns
Additional ETU guard time to be inserted between bytes to be transmitted
static void EMVSIM_HAL_SetCharacterWaitTime ( EMVSIM_Type *  base,
uint16_t  cwt 
)
inlinestatic

This function sets the character wait time value of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
cwtWait time value between characters
static uint16_t EMVSIM_HAL_GetCharacterWaitTime ( EMVSIM_Type *  base)
inlinestatic

This function returns the character wait time value of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
Returns
Wait time value between characters
static void EMVSIM_HAL_SetBlockWaitTime ( EMVSIM_Type *  base,
uint32_t  bwt 
)
inlinestatic

This function sets the block wait time value of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
bwtWait time value between the strat bit of last byte sent from EMVSIM module and the start bit of the first byte received from smart card
static uint32_t EMVSIM_HAL_GetBlockWaitTime ( EMVSIM_Type *  base)
inlinestatic

This function returns the block wait time value of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
Returns
Wait time value between the strat bit of last byte sent from EMVSIM module and the start bit of the first byte received from smart card
static void EMVSIM_HAL_SetBlockGuardTime ( EMVSIM_Type *  base,
uint16_t  bgt 
)
inlinestatic

This function sets the guard wait time value of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
bgtGuard time value between the strat bit of last byte sent from EMVSIM module and the start bit of the first byte received from smart card
static uint16_t EMVSIM_HAL_GetBlockGuardTime ( EMVSIM_Type *  base)
inlinestatic

This function returns the guard wait time value of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
Returns
Guard time value between the strat bit of last byte sent from EMVSIM module and the start bit of the first byte received from smart card
void EMVSIM_HAL_SetGPCNTValue ( EMVSIM_Type *  base,
uint8_t  gpcntIndex,
uint16_t  gpcntVal 
)

This function sets the timeout values of the general purpose counters of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
gpcntIndexIndex to general purpose counters
gpcntValTimer timeout value
uint16_t EMVSIM_HAL_GetGPCNTValue ( EMVSIM_Type *  base,
uint8_t  gpcntIndex 
)

This function returns the timeout values of the general purpose counters of the EMVSIM controller.

Parameters
baseEMVSIM module base pointer.
gpcntIndexIndex to general purpose counters
Returns
Timer timeout value