Go to the documentation of this file.
52 #ifndef _APP_ISO7816_H_
53 #define _APP_ISO7816_H_
65 #ifdef HAL_ISO7816_MODULE_ENABLED
73 #define APP_ISO7816_ACTION_NONE HAL_ISO7816_ACTION_NONE
74 #define APP_ISO7816_ACTION_OFF HAL_ISO7816_ACTION_OFF
75 #define APP_ISO7816_ACTION_STOPCLK HAL_ISO7816_ACTION_STOPCLK
76 #define APP_ISO7816_ACTION_ON HAL_ISO7816_ACTION_ON
77 #define APP_ISO7816_ACTION_WARMRST HAL_ISO7816_ACTION_WARMRST
78 #define APP_ISO7816_ACTION_RX HAL_ISO7816_ACTION_RX
79 #define APP_ISO7816_ACTION_TX HAL_ISO7816_ACTION_TX
80 #define APP_ISO7816_ACTION_TXRX HAL_ISO7816_ACTION_TXRX
86 #define APP_ISO7816_INTR_PRESENCE HAL_ISO7816_INTR_PRESENCE
87 #define APP_ISO7816_INTR_STATE_ERR HAL_ISO7816_INTR_STATE_ERR
88 #define APP_ISO7816_INTR_DMA_ERR HAL_ISO7816_INTR_DMA_ERR
89 #define APP_ISO7816_INTR_RETRY_ERR HAL_ISO7816_INTR_RETRY_ERR
90 #define APP_ISO7816_INTR_RX_ERR HAL_ISO7816_INTR_RX_ERR
91 #define APP_ISO7816_INTR_DONE HAL_ISO7816_INTR_DONE
98 #define APP_ISO7816_CARD_ABSENT HAL_ISO7816_CARD_ABSENT
99 #define APP_ISO7816_CARD_PRESENT HAL_ISO7816_CARD_PRESENT
105 #define APP_ISO7816_IO_STATE_OFF HAL_ISO7816_IO_STATE_OFF
106 #define APP_ISO7816_IO_STATE_IDLE HAL_ISO7816_IO_STATE_IDLE
107 #define APP_ISO7816_IO_STATE_RX_WAIT HAL_ISO7816_IO_STATE_RX_WAIT
108 #define APP_ISO7816_IO_STATE_RX HAL_ISO7816_IO_STATE_RX
109 #define APP_ISO7816_IO_STATE_TX HAL_ISO7816_IO_STATE_TX
110 #define APP_ISO7816_IO_STATE_TX_GUARD HAL_ISO7816_IO_STATE_TX_GUARD
116 #define APP_ISO7816_PWR_STATE_OFF HAL_ISO7816_PWR_STATE_OFF
117 #define APP_ISO7816_PWR_STATE_PWRUP_VCC HAL_ISO7816_PWR_STATE_PWRUP_VCC
118 #define APP_ISO7816_PWR_STATE_PWRUP_RST HAL_ISO7816_PWR_STATE_PWRUP_RST
119 #define APP_ISO7816_PWR_STATE_PWRDN_RST HAL_ISO7816_PWR_STATE_PWRDN_RST
120 #define APP_ISO7816_PWR_STATE_PWRDN_VCC HAL_ISO7816_PWR_STATE_PWRDN_VCC
121 #define APP_ISO7816_PWR_STATE_STOP_PRE HAL_ISO7816_PWR_STATE_STOP_PRE
122 #define APP_ISO7816_PWR_STATE_STOP HAL_ISO7816_PWR_STATE_STOP
123 #define APP_ISO7816_PWR_STATE_STOP_POST HAL_ISO7816_PWR_STATE_STOP_POST
124 #define APP_ISO7816_PWR_STATE_IDLE HAL_ISO7816_PWR_STATE_IDLE
125 #define APP_ISO7816_PWR_STATE_RX_TS0 HAL_ISO7816_PWR_STATE_RX_TS0
126 #define APP_ISO7816_PWR_STATE_RX_TS1 HAL_ISO7816_PWR_STATE_RX_TS1
127 #define APP_ISO7816_PWR_STATE_RX HAL_ISO7816_PWR_STATE_RX
128 #define APP_ISO7816_PWR_STATE_TX HAL_ISO7816_PWR_STATE_TX
129 #define APP_ISO7816_PWR_STATE_TX_RX HAL_ISO7816_PWR_STATE_TX_RX
225 #ifdef APP_DRIVER_WAKEUP_CALL_FUN
uint16_t app_iso7816_transmit_receive_async(uint16_t tx_size, uint16_t rx_size)
Transmit and receive in master mode an amount of data in non-blocking mode.
app_iso7816_evt_type_t
ISO7816 event Enumerations definition.
iso7816_handle_t * app_iso7816_get_handle(void)
Return the ISO7816 handle.
ISO7816 handle Structure definition.
@ APP_ISO7816_EVT_RX_CPLT
Requested RX transfer completed.
@ APP_ISO7816_EVT_ATR_CPLT
Requested TX transfer completed.
app_iso7816_pin_t io
Set the configuration of ISO7816 io pin.
@ APP_ISO7816_EVT_TX_RX_CPLT
Requested RX transfer completed.
ISO7816 device structure definition.
@ APP_ISO7816_EVT_ABORT
Error reported by ISO7816 peripheral.
app_iso7816_state_t
App iso7816 state types.
@ APP_ISO7816_TYPE_INTERRUPT
Interrupt operation mode.
app_iso7816_mode_t use_mode
Specifies the operation mode of ISO7816.
iso7816_env_t iso7816_env
ISO7816 device structure definition.
app_io_pull_t
GPIO pull Enumerations definition.
app_io_type_t
GPIO type Enumerations definition.
uint16_t app_iso7816_deinit(void)
De-initialize the APP ISO7816 DRIVER peripheral.
ISO7816 pin configure structure definition.
uint16_t size
ISO7816 transmitted/received counter.
app_iso7816_mode_t use_mode
ISO7816 operating mode Enumerations.
@ APP_ISO7816_EVT_TX_CPLT
Requested TX transfer completed.
@ APP_ISO7816_TYPE_MAX
Only for check parameter, not used as input parameters.
uint16_t app_iso7816_transmit_async(uint16_t size)
Transmits an amount of data in non-blocking mode with Interrupt/DMA.
Header file containing functions prototypes of GPIO app library.
uint16_t app_iso7816_transmit_sync(uint16_t size, uint32_t timeout)
Transmits an amount of data in blocking mode.
ISO7816 parameters structure definition.
iso7816_handle_t handle
ISO7816 handle Structure.
ISO7816 event structure definition.
app_iso7816_pin_t presence
Set the configuration of ISO7816 presence pin.
uint16_t app_iso7816_receive_async(uint16_t size)
Receive an amount of data in non-blocking mode with Interrupt/DMA.
uint32_t error_code
ISO7816 Error code.
@ APP_ISO7816_EVT_PRESENCE
Requested RX transfer completed.
This file contains all the functions prototypes for the HAL module driver.
uint16_t app_iso7816_set_action(uint32_t action)
Request ISO7816 to go to the next action.
@ APP_ISO7816_TYPE_POLLING
Polling operation mode.
app_iso7816_evt_handler_t evt_handler
ISO7816 event callback.
app_io_mux_t mux
Specifies the Peripheral to be connected to the selected pins.
app_iso7816_pin_t rst
Set the configuration of ISO7816 reset pin.
bool start_flag
ISO7816 start_flage.
uint32_t pin
Specifies the IO pins to be configured.
app_iso7816_state_t iso7816_state
ISO7816 state configure structure.
@ APP_ISO7816_EVT_ERROR
Error reported by ISO7816 peripheral.
uint16_t app_iso7816_init(app_iso7816_params_t *p_params, app_iso7816_evt_handler_t evt_handler)
Initialize the APP ISO7816 DRIVER according to the specified parameters in the app_iso7816_params_t a...
app_iso7816_pin_cfg_t pin_cfg
The pin configuration information for the ISO7816.
app_iso7816_mode_t
ISO7816 operating mode Enumerations definition.
app_io_pull_t pull
Specifies the Pull-up or Pull-Down activation for the selected pins.
app_io_mux_t
GPIO mux Enumerations definition.
uint16_t app_iso7816_transmit_receive_sync(uint16_t tx_size, uint16_t rx_size, uint32_t timeout)
Transmit and receive in master mode an amount of data in blocking mode.
void(* app_iso7816_evt_handler_t)(app_iso7816_evt_t *p_evt)
ISO7816 event callback definition.
uint32_t app_iso7816_get_power_states(void)
Get ISO7816 Power States.
ISO7816 IO configuration Structures.
app_io_type_t type
Specifies the type of IO.
Header file of app driver error code.
Header file of app driver config code.
ISO7816_init_structure ISO7816 init structure definition.
iso7816_init_t init
ISO7816 communication parameters.
uint16_t app_iso7816_receive_sync(uint16_t size, uint32_t timeout)
Receive an amount of data in blocking mode.
app_iso7816_pin_t clk
Set the configuration of ISO7816 clock pin.
uint16_t app_iso7816_set_etudiv(uint32_t divide)
Set divide ISO7816 clock.
app_iso7816_pin_cfg_t * p_pin_cfg
ISO7816 pin configure structure.
app_iso7816_evt_type_t type
Type of event.