![]() |
NUC472_NUC442_BSP V3.03.004
The Board Support Package for NUC472/NUC442
|
Macros | |
#define | SC_ENABLE_INT(sc, u32Mask) |
This macro enable smartcard interrupt. More... | |
#define | SC_DISABLE_INT(sc, u32Mask) |
This macro disable smartcard interrupt. More... | |
#define | SC_SET_VCC_PIN(sc, u32State) |
This macro set VCC pin state of smartcard interface. More... | |
#define | SC_SET_CLK_PIN(sc, u32OnOff) |
This macro turns CLK output on or off. More... | |
#define | SC_SET_IO_PIN(sc, u32State) |
This macro set I/O pin state of smartcard interface. More... | |
#define | SC_SET_RST_PIN(sc, u32State) |
This macro set RST pin state of smartcard interface. More... | |
#define | SC_READ(sc) |
This macro read one byte from smartcard module receive FIFO. More... | |
#define | SC_WRITE(sc, u8Data) |
This macro write one byte to smartcard module transmit FIFO. More... | |
#define | SC_SET_STOP_BIT_LEN(sc, u32Len) |
This macro set smartcard stop bit length. More... | |
Functions | |
__STATIC_INLINE void | SC_SetTxRetry (SC_T *sc, uint32_t u32Count) |
Enable/Disable Tx error retry, and set Tx error retry count. More... | |
__STATIC_INLINE void | SC_SetRxRetry (SC_T *sc, uint32_t u32Count) |
Enable/Disable Rx error retry, and set Rx error retry count. More... | |
uint32_t | SC_IsCardInserted (SC_T *sc) |
This function indicates specified smartcard slot status. More... | |
void | SC_ClearFIFO (SC_T *sc) |
This function reset both transmit and receive FIFO of specified smartcard module. More... | |
void | SC_Close (SC_T *sc) |
This function disable specified smartcard module. More... | |
void | SC_Open (SC_T *sc, uint32_t u32CD, uint32_t u32PWR) |
This function initialized smartcard module. More... | |
void | SC_ResetReader (SC_T *sc) |
This function reset specified smartcard module to its default state for activate smartcard. More... | |
void | SC_SetBlockGuardTime (SC_T *sc, uint32_t u32BGT) |
This function block guard time (BGT) of specified smartcard module. More... | |
void | SC_SetCharGuardTime (SC_T *sc, uint32_t u32CGT) |
This function character guard time (CGT) of specified smartcard module. More... | |
void | SC_StopAllTimer (SC_T *sc) |
This function stop all smartcard timer of specified smartcard module. More... | |
void | SC_StartTimer (SC_T *sc, uint32_t u32TimerNum, uint32_t u32Mode, uint32_t u32ETUCount) |
This function configure and start a smartcard timer of specified smartcard module. More... | |
void | SC_StopTimer (SC_T *sc, uint32_t u32TimerNum) |
This function stop a smartcard timer of specified smartcard module. More... | |
#define SC_DISABLE_INT | ( | sc, | |
u32Mask | |||
) |
This macro disable smartcard interrupt.
[in] | sc | Base address of smartcard module |
[in] | u32Mask | Interrupt mask to be disabled. A combination of |
#define SC_ENABLE_INT | ( | sc, | |
u32Mask | |||
) |
This macro enable smartcard interrupt.
[in] | sc | Base address of smartcard module |
[in] | u32Mask | Interrupt mask to be enabled. A combination of |
#define SC_READ | ( | sc | ) |
#define SC_SET_CLK_PIN | ( | sc, | |
u32OnOff | |||
) |
This macro turns CLK output on or off.
[in] | sc | Base address of smartcard module |
[in] | u32OnOff | Clock on or off for selected smartcard module, valid values are SC_CLK_ON and SC_CLK_OFF |
#define SC_SET_IO_PIN | ( | sc, | |
u32State | |||
) |
This macro set I/O pin state of smartcard interface.
[in] | sc | Base address of smartcard module |
[in] | u32State | Pin state of I/O pin, valid parameters are SC_PIN_STATE_HIGH and SC_PIN_STATE_LOW |
#define SC_SET_RST_PIN | ( | sc, | |
u32State | |||
) |
This macro set RST pin state of smartcard interface.
[in] | sc | Base address of smartcard module |
[in] | u32State | Pin state of RST pin, valid parameters are SC_PIN_STATE_HIGH and SC_PIN_STATE_LOW |
#define SC_SET_STOP_BIT_LEN | ( | sc, | |
u32Len | |||
) |
#define SC_SET_VCC_PIN | ( | sc, | |
u32State | |||
) |
This macro set VCC pin state of smartcard interface.
[in] | sc | Base address of smartcard module |
[in] | u32State | Pin state of VCC pin, valid parameters are SC_PIN_STATE_HIGH and SC_PIN_STATE_LOW |
#define SC_WRITE | ( | sc, | |
u8Data | |||
) |
void SC_ClearFIFO | ( | SC_T * | sc | ) |
void SC_Close | ( | SC_T * | sc | ) |
uint32_t SC_IsCardInserted | ( | SC_T * | sc | ) |
void SC_Open | ( | SC_T * | sc, |
uint32_t | u32CD, | ||
uint32_t | u32PWR | ||
) |
This function initialized smartcard module.
[in] | sc | Base address of smartcard module |
[in] | u32CD | Card detect polarity, select the CD pin state which indicates card absent. Could be -SC_PIN_STATE_HIGH -SC_PIN_STATE_LOW -SC_PIN_STATE_IGNORE, no card detect pin, always assumes card present |
[in] | u32PWR | Power off polarity, select the PWR pin state which could set smartcard VCC to high level. Could be -SC_PIN_STATE_HIGH -SC_PIN_STATE_LOW |
void SC_ResetReader | ( | SC_T * | sc | ) |
void SC_SetBlockGuardTime | ( | SC_T * | sc, |
uint32_t | u32BGT | ||
) |
void SC_SetCharGuardTime | ( | SC_T * | sc, |
uint32_t | u32CGT | ||
) |
__STATIC_INLINE void SC_SetRxRetry | ( | SC_T * | sc, |
uint32_t | u32Count | ||
) |
__STATIC_INLINE void SC_SetTxRetry | ( | SC_T * | sc, |
uint32_t | u32Count | ||
) |
void SC_StartTimer | ( | SC_T * | sc, |
uint32_t | u32TimerNum, | ||
uint32_t | u32Mode, | ||
uint32_t | u32ETUCount | ||
) |
This function configure and start a smartcard timer of specified smartcard module.
[in] | sc | Base address of smartcard module |
[in] | u32TimerNum | Timer(s) to start. Valid values are 0, 1, 2. |
[in] | u32Mode | Timer operating mode, valid values are: |
[in] | u32ETUCount | Timer timeout duration, ETU based. For timer 0, valid range are between 1~0x1000000ETUs. For timer 1 and timer 2, valid range are between 1 ~ 0x100 ETUs |
void SC_StopAllTimer | ( | SC_T * | sc | ) |
void SC_StopTimer | ( | SC_T * | sc, |
uint32_t | u32TimerNum | ||
) |
This function stop a smartcard timer of specified smartcard module.
[in] | sc | Base address of smartcard module |
[in] | u32TimerNum | Timer(s) to stop. Valid values are 0, 1, 2. |