Classes | Macros | Typedefs | Enumerations | Functions
gr55xx_hal_iso7816.h File Reference

Header file containing functions prototypes of ISO7816 HAL library. More...

`#include "gr55xx_ll_iso7816.h"`
`#include "gr55xx_hal_def.h"`
Include dependency graph for gr55xx_hal_iso7816.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
struct | iso7816_init_t
| ISO7816_init_structure ISO7816 init structure definition. More...
struct | _iso7816_handle_t
| ISO7816 handle Structure definition. More...
struct | _hal_iso7816_callback
| HAL_ISO7816 Callback function definition. More...

## Macros
#define | ISO7816_DEFAULT_CONFIG
| ISO7816_default_config InitStruct default configuration. More...
#define | HAL_ISO7816_ACTION_NONE LL_ISO7816_ACTION_NONE
| Do Nothing. More...
#define | HAL_ISO7816_ACTION_OFF LL_ISO7816_ACTION_OFF
| Switch Off. More...
#define | HAL_ISO7816_ACTION_STOPCLK LL_ISO7816_ACTION_STOPCLK
| Stop the clock. More...
#define | HAL_ISO7816_ACTION_ON LL_ISO7816_ACTION_ON
| Switch on and receive ATR. More...
#define | HAL_ISO7816_ACTION_WARMRST LL_ISO7816_ACTION_WARMRST
| Trigger warm reset and receive ATR. More...
#define | HAL_ISO7816_ACTION_RX LL_ISO7816_ACTION_RX
| Receive. More...
#define | HAL_ISO7816_ACTION_TX LL_ISO7816_ACTION_TX
| Transmit. More...
#define | HAL_ISO7816_ACTION_TXRX LL_ISO7816_ACTION_TXRX
| Transmit, followed by RX. More...
#define | HAL_ISO7816_INTR_TEST LL_ISO7816_INTR_TEST
| Test interrupt More...
#define | HAL_ISO7816_INTR_PRESENCE LL_ISO7816_INTR_PRESENCE
| Source presence interrupt More...
#define | HAL_ISO7816_INTR_STATE_ERR LL_ISO7816_INTR_STATE_ERR
| Source state error interrupt More...
#define | HAL_ISO7816_INTR_DMA_ERR LL_ISO7816_INTR_DMA_ERR
| Source dma error interrupt More...
#define | HAL_ISO7816_INTR_RETRY_ERR LL_ISO7816_INTR_RETRY_ERR
| Source retry error interrupt More...
#define | HAL_ISO7816_INTR_RX_ERR LL_ISO7816_INTR_RX_ERR
| Source rx error interrupt More...
#define | HAL_ISO7816_INTR_DONE LL_ISO7816_INTR_DONE
| Source done error interrupt More...
#define | HAL_ISO7816_CARD_ABSENT LL_ISO7816_CARD_ABSENT
| SIM Card is absent. More...
#define | HAL_ISO7816_CARD_PRESENT LL_ISO7816_CARD_PRESENT
| SIM Card is present. More...
#define | HAL_ISO7816_IO_STATE_OFF LL_ISO7816_IO_STATE_OFF
| Off More...
#define | HAL_ISO7816_IO_STATE_IDLE LL_ISO7816_IO_STATE_IDLE
| Idle More...
#define | HAL_ISO7816_IO_STATE_RX_WAIT LL_ISO7816_IO_STATE_RX_WAIT
| Receive Wait More...
#define | HAL_ISO7816_IO_STATE_RX LL_ISO7816_IO_STATE_RX
| Receive More...
#define | HAL_ISO7816_IO_STATE_TX LL_ISO7816_IO_STATE_TX
| Transmit More...
#define | HAL_ISO7816_IO_STATE_TX_GUARD LL_ISO7816_IO_STATE_TX_GUARD
| Transmit Guard More...
#define | HAL_ISO7816_PWR_STATE_OFF LL_ISO7816_PWR_STATE_OFF
| Off More...
#define | HAL_ISO7816_PWR_STATE_PWRUP_VCC LL_ISO7816_PWR_STATE_PWRUP_VCC
| Power up VCC More...
#define | HAL_ISO7816_PWR_STATE_PWRUP_RST LL_ISO7816_PWR_STATE_PWRUP_RST
| Power up reset More...
#define | HAL_ISO7816_PWR_STATE_PWRDN_RST LL_ISO7816_PWR_STATE_PWRDN_RST
| Power Down reset More...
#define | HAL_ISO7816_PWR_STATE_PWRDN_VCC LL_ISO7816_PWR_STATE_PWRDN_VCC
| Power Down VCC More...
#define | HAL_ISO7816_PWR_STATE_STOP_PRE LL_ISO7816_PWR_STATE_STOP_PRE
| Preparing Clock Stop More...
#define | HAL_ISO7816_PWR_STATE_STOP LL_ISO7816_PWR_STATE_STOP
| Clock Stopped More...
#define | HAL_ISO7816_PWR_STATE_STOP_POST LL_ISO7816_PWR_STATE_STOP_POST
| Exiting Clock Stop More...
#define | HAL_ISO7816_PWR_STATE_IDLE LL_ISO7816_PWR_STATE_IDLE
| Idle More...
#define | HAL_ISO7816_PWR_STATE_RX_TS0 LL_ISO7816_PWR_STATE_RX_TS0
| RX TS Character More...
#define | HAL_ISO7816_PWR_STATE_RX_TS1 LL_ISO7816_PWR_STATE_RX_TS1
| RX TS Character More...
#define | HAL_ISO7816_PWR_STATE_RX LL_ISO7816_PWR_STATE_RX
| Receive More...
#define | HAL_ISO7816_PWR_STATE_TX LL_ISO7816_PWR_STATE_TX
| Transmit More...
#define | HAL_ISO7816_PWR_STATE_TX_RX LL_ISO7816_PWR_STATE_TX_RX
| Transmit and Receive More...
#define | HAL_ISO7816_ERROR_NONE ((uint32_t)0x00000000)
| No error More...
#define | HAL_ISO7816_ERROR_TIMEOUT ((uint32_t)0x00000001)
| Timeout error More...
#define | HAL_ISO7816_ERROR_TRANSFER ((uint32_t)0x00000002)
| Transfer error More...
#define | HAL_ISO7816_ERROR_INVALID_PARAM ((uint32_t)0x00000008)
| Invalid parameters error. More...
#define | __HAL_ISO7816_ENABLE_IT(__HANDLE__, __INTERRUPT__) SET_BITS((__HANDLE__)->p_instance->INT_MASK, (__INTERRUPT__))
| Enable the specified ISO7816 interrupts. More...
#define | __HAL_ISO7816_DISABLE_IT(__HANDLE__, __INTERRUPT__) CLEAR_BITS((__HANDLE__)->p_instance->INT_MASK, (__INTERRUPT__))
| Disable the specified ISO7816 interrupts. More...
#define | __HAL_ISO7816_IT_GET_IT_FLAG(__ISO7816_REGS) ll_iso7816_get_it_flag(__ISO7816_REGS)
| Get the ISO7816 interrupt flags. More...

## Typedefs
typedef struct _iso7816_handle_t | iso7816_handle_t
| ISO7816 handle Structure definition. More...
typedef struct _hal_iso7816_callback | hal_iso7816_callback_t
| HAL_ISO7816 Callback function definition. More...

## Enumerations
enum | hal_iso7816_state_t { HAL_ISO7816_STATE_RESET = 0x00U, HAL_ISO7816_STATE_READY = 0x20U, HAL_ISO7816_STATE_BUSY = 0x24U, HAL_ISO7816_STATE_BUSY_TX = 0x21U, HAL_ISO7816_STATE_BUSY_RX = 0x22U, HAL_ISO7816_STATE_BUSY_TX_RX = 0x23U, HAL_ISO7816_STATE_ABORT = 0x08U, HAL_ISO7816_STATE_TIMEOUT = 0xA0U, HAL_ISO7816_STATE_ERROR = 0xE0U }
| HAL ISO7816 State Enumerations definition. More...

## Functions
hal_status_t | hal_iso7816_transmit (iso7816_handle_t *p_iso7816, uint16_t tx_size, uint32_t timeout)
| Transimit data in blocking mode. More...
hal_status_t | hal_iso7816_receive (iso7816_handle_t *p_iso7816, uint16_t rx_size, uint32_t timeout)
| Receive data in blocking mode. More...
hal_status_t | hal_iso7816_transmit_receive (iso7816_handle_t *p_iso7816, uint16_t tx_size, uint16_t rx_size, uint32_t timeout)
| Transimit and receive data in blocking mode. More...
hal_status_t | hal_iso7816_transmit_it (iso7816_handle_t *p_iso7816, uint16_t tx_size)
| Transimit data in non-blocking mode with Interrupt. More...
hal_status_t | hal_iso7816_receive_it (iso7816_handle_t *p_iso7816, uint16_t rx_size)
| Receive data in non-blocking mode with Interrupt. More...
hal_status_t | hal_iso7816_transmit_receive_it (iso7816_handle_t *p_iso7816, uint16_t tx_size, uint16_t rx_size)
| Transimit and receive data in non-blocking mode with Interrupt. More...
hal_status_t | hal_iso7816_abort (iso7816_handle_t *p_iso7816)
| Transfer Abort functions. More...
hal_status_t | hal_iso7816_init (iso7816_handle_t *p_iso7816)
| Initializes the ISO7816 according to the specified parameters in the iso7816_init_t and initialize the associated handle. More...
hal_status_t | hal_iso7816_deinit (iso7816_handle_t *p_iso7816)
| De-initializes the ISO7816 according to the specified parameters in the iso7816_init_t and initialize the associated handle. More...
void | hal_iso7816_msp_init (iso7816_handle_t *p_iso7816)
| Initialize the ISO7816 MSP. More...
void | hal_iso7816_msp_deinit (iso7816_handle_t *p_iso7816)
| De-initialize the ISO7816 MSP. More...
void | hal_iso7816_irq_handler (iso7816_handle_t *p_iso7816)
| Handle ISO7816 interrupt request. More...
void | hal_iso7816_presence_callback (iso7816_handle_t *p_iso7816)
| Card presence state changed callback. More...
void | hal_iso7816_atr_cplt_callback (iso7816_handle_t *p_iso7816)
| Receive ART completed callback. More...
void | hal_iso7816_rx_cplt_callback (iso7816_handle_t *p_iso7816)
| Rx Transfer completed callback. More...
void | hal_iso7816_tx_cplt_callback (iso7816_handle_t *p_iso7816)
| Tx Transfer completed callback. More...
void | hal_iso7816_tx_rx_cplt_callback (iso7816_handle_t *p_iso7816)
| Tx and Rx Transfer completed callback. More...
void | hal_iso7816_error_callback (iso7816_handle_t *p_iso7816)
| ISO7816 error callback. More...
void | hal_iso7816_abort_cplt_callback (iso7816_handle_t *p_iso7816)
| ISO7816 Abort Completed callback. More...
hal_iso7816_state_t | hal_iso7816_get_state (iso7816_handle_t *p_iso7816)
| Return the ISO7816 handle state. More...
hal_status_t | hal_iso7816_set_action (iso7816_handle_t *p_iso7816, uint32_t action)
| Request ISO7816 to go to the next action. More...
uint32_t | hal_iso7816_get_power_states (iso7816_handle_t *p_iso7816)
| Get ISO7816 Power States. More...
hal_status_t | hal_iso7816_set_etudiv (iso7816_handle_t *p_iso7816, uint32_t divide)
| Set divide ISO7816 clock. More...
uint32_t | hal_iso7816_get_error (iso7816_handle_t *p_iso7816)
| Return the ISO7816 error code. More...
hal_status_t | hal_iso7816_suspend_reg (iso7816_handle_t *p_iso7816)
| Suspend some registers related to ISO7816 configuration before sleep. More...
hal_status_t | hal_iso7816_resume_reg (iso7816_handle_t *p_iso7816)
| Restore some registers related to ISO7816 configuration after sleep. More...

## Detailed Description

Header file containing functions prototypes of ISO7816 HAL library.

Author
  BLE Driver Team

Attention

  ##### Copyright (c) 2019 GOODIX

All rights reserved.

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_hal_iso7816.h.