Header file containing functions prototypes of ISO7816 LL library. More...
#include "gr55xx.h"
Go to the source code of this file.
Classes | |
struct | _ll_iso7816_init |
LL ISO7816 init Structure definition. More... | |
Macros | |
#define | LL_ISO7816_ACTION_NONE 0x00000000U |
#define | LL_ISO7816_ACTION_OFF 0x00000001U |
#define | LL_ISO7816_ACTION_STOPCLK 0x00000002U |
#define | LL_ISO7816_ACTION_ON 0x00000003U |
#define | LL_ISO7816_ACTION_WARMRST 0x00000004U |
#define | LL_ISO7816_ACTION_RX 0x00000005U |
#define | LL_ISO7816_ACTION_TX 0x00000006U |
#define | LL_ISO7816_ACTION_TXRX 0x00000007U |
#define | LL_ISO7816_INTR_TEST ISO7816_STAT_IRQ_TEST |
#define | LL_ISO7816_INTR_PRESENCE ISO7816_STAT_IRQ_PRESENCE |
#define | LL_ISO7816_INTR_STATE_ERR ISO7816_STAT_IRQ_STAT_ERR |
#define | LL_ISO7816_INTR_DMA_ERR ISO7816_STAT_IRQ_DMA_ERR |
#define | LL_ISO7816_INTR_RETRY_ERR ISO7816_STAT_IRQ_RETRY_ERR |
#define | LL_ISO7816_INTR_RX_ERR ISO7816_STAT_IRQ_RX_ERR |
#define | LL_ISO7816_INTR_DONE ISO7816_STAT_IRQ_DONE |
#define | LL_ISO7816_INTR_MASK_ALL ISO7816_INTR_ALL |
#define | LL_ISO7816_CARD_ABSENT 0x00000000U |
#define | LL_ISO7816_CARD_PRESENT 0x00000001U |
#define | LL_ISO7816_IO_STATE_OFF (0x0UL << ISO7816_STAT_IO_STAT_POS) |
#define | LL_ISO7816_IO_STATE_IDLE (0x1UL << ISO7816_STAT_IO_STAT_POS) |
#define | LL_ISO7816_IO_STATE_RX_WAIT (0x4UL << ISO7816_STAT_IO_STAT_POS) |
#define | LL_ISO7816_IO_STATE_RX (0x5UL << ISO7816_STAT_IO_STAT_POS) |
#define | LL_ISO7816_IO_STATE_TX (0x6UL << ISO7816_STAT_IO_STAT_POS) |
#define | LL_ISO7816_IO_STATE_TX_GUARD (0x7UL << ISO7816_STAT_IO_STAT_POS) |
#define | LL_ISO7816_PWR_STATE_OFF (0x0UL << ISO7816_STAT_PWR_STAT_POS) |
#define | LL_ISO7816_PWR_STATE_PWRUP_VCC (0x1UL << ISO7816_STAT_PWR_STAT_POS) |
#define | LL_ISO7816_PWR_STATE_PWRUP_RST (0x2UL << ISO7816_STAT_PWR_STAT_POS) |
#define | LL_ISO7816_PWR_STATE_PWRDN_RST (0x3UL << ISO7816_STAT_PWR_STAT_POS) |
#define | LL_ISO7816_PWR_STATE_PWRDN_VCC (0x4UL << ISO7816_STAT_PWR_STAT_POS) |
#define | LL_ISO7816_PWR_STATE_STOP_PRE (0x5UL << ISO7816_STAT_PWR_STAT_POS) |
#define | LL_ISO7816_PWR_STATE_STOP (0x6UL << ISO7816_STAT_PWR_STAT_POS) |
#define | LL_ISO7816_PWR_STATE_STOP_POST (0x7UL << ISO7816_STAT_PWR_STAT_POS) |
#define | LL_ISO7816_PWR_STATE_IDLE (0x8UL << ISO7816_STAT_PWR_STAT_POS) |
#define | LL_ISO7816_PWR_STATE_RX_TS0 (0x9UL << ISO7816_STAT_PWR_STAT_POS) |
#define | LL_ISO7816_PWR_STATE_RX_TS1 (0xAUL << ISO7816_STAT_PWR_STAT_POS) |
#define | LL_ISO7816_PWR_STATE_RX (0xBUL << ISO7816_STAT_PWR_STAT_POS) |
#define | LL_ISO7816_PWR_STATE_TX (0xCUL << ISO7816_STAT_PWR_STAT_POS) |
#define | LL_ISO7816_PWR_STATE_TX_RX (0xDUL << ISO7816_STAT_PWR_STAT_POS) |
#define | LL_ISO7816_CLKSTOP_LOW (0x00000000UL) |
#define | LL_ISO7816_CLKSTOP_HIGH (0x80000000UL) |
#define | LL_ISO7816_CODING_DEFAULT (0x00000000UL) |
#define | LL_ISO7816_CODING_INVERSE (0x00000001UL) |
#define | LL_ISO7816_WriteReg(__instance__, __REG__, __VALUE__) WRITE_REG(__instance__->__REG__, (__VALUE__)) |
Write a value in ISO7816 register. More... | |
#define | LL_ISO7816_ReadReg(__instance__, __REG__) READ_REG(__instance__->__REG__) |
Read a value in ISO7816 register. More... | |
Typedefs | |
typedef struct _ll_iso7816_init | ll_iso7816_init_t |
LL ISO7816 init Structure definition. More... | |
Functions | |
__STATIC_INLINE void | ll_iso7816_set_action (iso7816_regs_t *ISO7816x, uint32_t action) |
Request ISO7816 to go to the next action. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_is_busy (iso7816_regs_t *ISO7816x) |
Get ISO7816 states. More... | |
__STATIC_INLINE void | ll_iso7816_clear_tx_retry_max (iso7816_regs_t *ISO7816x) |
Clear Transmit Retries Maximum. More... | |
__STATIC_INLINE void | ll_iso7816_clear_rx_retry_max (iso7816_regs_t *ISO7816x) |
Clear Receive Retries Maximum. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_check_card_presence (iso7816_regs_t *ISO7816x) |
Check Card presence. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_tx_retry_max (iso7816_regs_t *ISO7816x) |
Get Maximum number of seen transmit retries after error signaling by ISO7816. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_rx_retry_max (iso7816_regs_t *ISO7816x) |
Get Maximum number of seen receive retries after error signaling by ISO7816. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_io_states (iso7816_regs_t *ISO7816x) |
Get ISO7816 IO States. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_power_states (iso7816_regs_t *ISO7816x) |
Get ISO7816 Power States. More... | |
__STATIC_INLINE void | ll_iso7816_set_clkstop_level (iso7816_regs_t *ISO7816x, uint32_t level) |
Set value of the clock output during stopped Clock. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_clkstop_level (iso7816_regs_t *ISO7816x) |
Get value of the clock output during stopped Clock. More... | |
__STATIC_INLINE void | ll_iso7816_set_clkdiv (iso7816_regs_t *ISO7816x, uint32_t value) |
Set clock division. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_clkdiv (iso7816_regs_t *ISO7816x) |
Get clock division. More... | |
__STATIC_INLINE void | ll_iso7816_set_etudiv (iso7816_regs_t *ISO7816x, uint32_t divide) |
Set divide ISO7816 clock. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_etudiv (iso7816_regs_t *ISO7816x) |
Get divide ISO7816 clock. More... | |
__STATIC_INLINE void | ll_iso7816_set_waittime (iso7816_regs_t *ISO7816x, uint32_t wait_time) |
Set ISO7816 wait_time in ETU. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_waittime (iso7816_regs_t *ISO7816x) |
Get maximum card response time(leading edge to leading edge) More... | |
__STATIC_INLINE void | ll_iso7816_set_guardtime (iso7816_regs_t *ISO7816x, uint32_t guardtime) |
Set ISO7816 guard_time in ETU. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_guardtime (iso7816_regs_t *ISO7816x) |
Get time between the leading edges of two consecutive characters. More... | |
__STATIC_INLINE void | ll_iso7816_set_retry_limit (iso7816_regs_t *ISO7816x, uint32_t number) |
Set maximum number of issued retries before giving up. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_retry_limit (iso7816_regs_t *ISO7816x) |
Get maximum number of issued retries before giving up. More... | |
__STATIC_INLINE void | ll_iso7816_enable_coding_detection (iso7816_regs_t *ISO7816x) |
Enable coding detection. More... | |
__STATIC_INLINE void | ll_iso7816_disable_coding_detection (iso7816_regs_t *ISO7816x) |
Disable coding detection. More... | |
__STATIC_INLINE void | ll_iso7816_set_coding_convention (iso7816_regs_t *ISO7816x, uint32_t convention) |
Set coding convention. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_coding_convention (iso7816_regs_t *ISO7816x) |
Get coding convention. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_current_addr (iso7816_regs_t *ISO7816x) |
Get current address relative to base_addr. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_current_addr_frac (iso7816_regs_t *ISO7816x) |
Get address fraction. More... | |
__STATIC_INLINE void | ll_iso7816_set_buffer_addr (iso7816_regs_t *ISO7816x, uint32_t addr) |
Set start address for RX and TX buffer. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_buffer_addr (iso7816_regs_t *ISO7816x) |
Get start address for RX and TX buffer. More... | |
__STATIC_INLINE void | ll_iso7816_set_base_addr (iso7816_regs_t *ISO7816x, uint32_t addr) |
Set base address for RX and TX buffer. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_base_addr (iso7816_regs_t *ISO7816x) |
Get base address for RX and TX buffer. More... | |
__STATIC_INLINE void | ll_iso7816_set_start_addr (iso7816_regs_t *ISO7816x, uint32_t addr) |
Set start address for RX and TX buffer, relative to base_addr. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_start_addr (iso7816_regs_t *ISO7816x) |
Get start address for RX and TX buffer, relative to base_addr. More... | |
__STATIC_INLINE void | ll_iso7816_set_rx_end_addr (iso7816_regs_t *ISO7816x, uint32_t addr) |
Set end address of receive buffer, relative to base_addr. More... | |
__STATIC_INLINE void | ll_iso7816_set_rx_endbyte_addr (iso7816_regs_t *ISO7816x, uint32_t addr) |
Set RX endbyte address of receive buffer, relative to base_addr. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_rx_end_addr (iso7816_regs_t *ISO7816x) |
Get RX end address of receive buffer, relative to base_addr. More... | |
__STATIC_INLINE void | ll_iso7816_set_rx_end_addr_frac (iso7816_regs_t *ISO7816x, uint32_t frac) |
Set RX end address fraction. More... | |
__STATIC_INLINE void | ll_iso7816_set_tx_endbyte_addr (iso7816_regs_t *ISO7816x, uint32_t addr) |
Set TX endbyte address of buffer, relative to base_addr. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_tx_endbyte_addr (iso7816_regs_t *ISO7816x) |
Get TX endbyte address of buffer, relative to base_addr. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_rx_endbyte_addr (iso7816_regs_t *ISO7816x) |
Get RX endbyte address of buffer, relative to base_addr. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_rx_end_addr_frac (iso7816_regs_t *ISO7816x) |
Get RX end address fraction. More... | |
__STATIC_INLINE void | ll_iso7816_set_tx_end_addr (iso7816_regs_t *ISO7816x, uint32_t addr) |
Set end address of transmit buffer, relative to base_addr. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_tx_end_addr (iso7816_regs_t *ISO7816x) |
Get end address of transmit buffer, relative to base_addr. More... | |
__STATIC_INLINE void | ll_iso7816_set_tx_end_addr_frac (iso7816_regs_t *ISO7816x, uint32_t frac) |
Set TX end address fraction. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_tx_end_addr_frac (iso7816_regs_t *ISO7816x) |
Get TX end address fraction. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_get_it_flag (iso7816_regs_t *ISO7816x) |
Get ISO7816 interrupt flags. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_is_active_flag_test (iso7816_regs_t *ISO7816x) |
Indicate the status of STAT_TEST flag. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_is_active_flag_presence (iso7816_regs_t *ISO7816x) |
Indicate the status of STAT_PRESENCE flag. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_is_active_flag_state_err (iso7816_regs_t *ISO7816x) |
Indicate the status of STAT_STATE_ERR flag. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_is_active_flag_dma_err (iso7816_regs_t *ISO7816x) |
Indicate the status of STAT_DMA_ERR flag. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_is_active_flag_retry_err (iso7816_regs_t *ISO7816x) |
Indicate the status of STAT_RETRY_ERR flag. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_is_active_flag_rx_err (iso7816_regs_t *ISO7816x) |
Indicate the status of STAT_RX_ERR flag. More... | |
__STATIC_INLINE uint32_t | ll_iso7816_is_active_flag_done (iso7816_regs_t *ISO7816x) |
Indicate the status of STAT_DONE flag. More... | |
__STATIC_INLINE void | ll_iso7816_clear_flag_all_intr (iso7816_regs_t *ISO7816x) |
Clear the combined interrupt, all individual interrupts, and the STAT register. More... | |
__STATIC_INLINE void | ll_iso7816_clear_flag_test (iso7816_regs_t *ISO7816x) |
Clear test flag. More... | |
__STATIC_INLINE void | ll_iso7816_clear_flag_presence (iso7816_regs_t *ISO7816x) |
Clear presence flag. More... | |
__STATIC_INLINE void | ll_iso7816_clear_flag_state_err (iso7816_regs_t *ISO7816x) |
Clear state error flag. More... | |
__STATIC_INLINE void | ll_iso7816_clear_flag_dma_err (iso7816_regs_t *ISO7816x) |
Clear dma error flag. More... | |
__STATIC_INLINE void | ll_iso7816_clear_flag_retry_err (iso7816_regs_t *ISO7816x) |
Clear retry error flag. More... | |
__STATIC_INLINE void | ll_iso7816_clear_flag_rx_err (iso7816_regs_t *ISO7816x) |
Clear RX error flag. More... | |
__STATIC_INLINE void | ll_iso7816_clear_flag_done (iso7816_regs_t *ISO7816x) |
Clear done flag. More... | |
error_status_t | ll_iso7816_init (iso7816_regs_t *ISO7816x, ll_iso7816_init_t *p_iso7816_init) |
Initialize the ISO7816 registers according to the specified parameters in p_iso7816_init. More... | |
error_status_t | ll_iso7816_deinit (iso7816_regs_t *ISO7816x) |
De-initialize the ISO7816 registers to their default reset values. More... | |
Header file containing functions prototypes of ISO7816 LL library.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file gr55xx_ll_iso7816.h.