+ Collaboration diagram for Functions:

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

Function Documentation

◆ hal_iso7816_abort()

hal_status_t hal_iso7816_abort ( iso7816_handle_t p_iso7816)

Transfer Abort functions.

Parameters
p_iso7816Pointer to an ISO7816 handle which contains the configuration information for the specified ISO7816.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_iso7816_abort_cplt_callback()

void hal_iso7816_abort_cplt_callback ( iso7816_handle_t p_iso7816)

ISO7816 Abort Completed callback.

Parameters
[in]p_iso7816ISO7816 handle.

◆ hal_iso7816_atr_cplt_callback()

void hal_iso7816_atr_cplt_callback ( iso7816_handle_t p_iso7816)

Receive ART completed callback.

Parameters
[in]p_iso7816Pointer to an ISO7816 handle which contains the configuration information for the specified ISO7816 module.

◆ hal_iso7816_deinit()

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.

Parameters
[in]p_iso7816Pointer to an ISO7816 handle which contains the configuration information for the specified ISO7816.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_iso7816_error_callback()

void hal_iso7816_error_callback ( iso7816_handle_t p_iso7816)

ISO7816 error callback.

Parameters
[in]p_iso7816Pointer to an ISO7816 handle which contains the configuration information for the specified ISO7816 module.

◆ hal_iso7816_get_error()

uint32_t hal_iso7816_get_error ( iso7816_handle_t p_iso7816)

Return the ISO7816 error code.

Parameters
[in]p_iso7816ISO7816 handle.
Returns
ISO7816 Error Code

◆ hal_iso7816_get_power_states()

◆ hal_iso7816_get_state()

◆ hal_iso7816_init()

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.

Parameters
[in]p_iso7816Pointer to an ISO7816 handle which contains the configuration information for the specified ISO7816.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_iso7816_irq_handler()

void hal_iso7816_irq_handler ( iso7816_handle_t p_iso7816)

Handle ISO7816 interrupt request.

Parameters
[in]p_iso7816Pointer to an ISO7816 handle which contains the configuration information for the specified ISO7816.

◆ hal_iso7816_msp_deinit()

void hal_iso7816_msp_deinit ( iso7816_handle_t p_iso7816)

De-initialize the ISO7816 MSP.

Note
This function should not be modified. When the callback is needed, the hal_iso7816_msp_deinit could be implemented in the user file.
Parameters
[in]p_iso7816Pointer to an ISO7816 handle which contains the configuration information for the specified ISO7816.

◆ hal_iso7816_msp_init()

void hal_iso7816_msp_init ( iso7816_handle_t p_iso7816)

Initialize the ISO7816 MSP.

Note
This function should not be modified. When the callback is needed, the hal_iso7816_msp_init could be implemented in the user file.
Parameters
[in]p_iso7816Pointer to an ISO7816 handle which contains the configuration information for the specified ISO7816.

◆ hal_iso7816_presence_callback()

void hal_iso7816_presence_callback ( iso7816_handle_t p_iso7816)

Card presence state changed callback.

Parameters
[in]p_iso7816Pointer to an ISO7816 handle which contains the configuration information for the specified ISO7816 module.

◆ hal_iso7816_receive()

hal_status_t hal_iso7816_receive ( iso7816_handle_t p_iso7816,
uint16_t  rx_size,
uint32_t  timeout 
)

Receive data in blocking mode.

Parameters
p_iso7816Pointer to an ISO7816 handle which contains the configuration information for the specified ISO7816.
rx_sizeBytes of data to receive
timeoutTimeout duration
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_iso7816_receive_it()

hal_status_t hal_iso7816_receive_it ( iso7816_handle_t p_iso7816,
uint16_t  rx_size 
)

Receive data in non-blocking mode with Interrupt.

Parameters
p_iso7816Pointer to an ISO7816 handle which contains the configuration information for the specified ISO7816.
rx_sizeBytes of data to receive
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_iso7816_resume_reg()

hal_status_t hal_iso7816_resume_reg ( iso7816_handle_t p_iso7816)

Restore some registers related to ISO7816 configuration after sleep.

This function must be used in conjunction with the hal_iso7816_suspend_reg().

Parameters
[in]p_iso7816ISO7816 handle.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_iso7816_rx_cplt_callback()

void hal_iso7816_rx_cplt_callback ( iso7816_handle_t p_iso7816)

Rx Transfer completed callback.

Parameters
[in]p_iso7816Pointer to an ISO7816 handle which contains the configuration information for the specified ISO7816 module.

◆ hal_iso7816_set_action()

hal_status_t hal_iso7816_set_action ( iso7816_handle_t p_iso7816,
uint32_t  action 
)

Request ISO7816 to go to the next action.

Parameters
p_iso7816ISO7816 handle.
actionThis parameter can be one of the following values:
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.

◆ hal_iso7816_set_etudiv()

hal_status_t hal_iso7816_set_etudiv ( iso7816_handle_t p_iso7816,
uint32_t  divide 
)

Set divide ISO7816 clock.

Note
Divide SIM clock by this value+1 to define ETU length. The reset value is the one, needed for theATR.
Parameters
p_iso7816ISO7816 handle.
divideThis parameter should range between 0x0 and 0x3FF.
Return values
None.

◆ hal_iso7816_suspend_reg()

hal_status_t hal_iso7816_suspend_reg ( iso7816_handle_t p_iso7816)

Suspend some registers related to ISO7816 configuration before sleep.

Parameters
[in]p_iso7816ISO7816 handle.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_iso7816_transmit()

hal_status_t hal_iso7816_transmit ( iso7816_handle_t p_iso7816,
uint16_t  tx_size,
uint32_t  timeout 
)

Transimit data in blocking mode.

Parameters
p_iso7816Pointer to an ISO7816 handle which contains the configuration information for the specified ISO7816.
tx_sizeBytes of data to transmit
timeoutTimeout duration
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_iso7816_transmit_it()

hal_status_t hal_iso7816_transmit_it ( iso7816_handle_t p_iso7816,
uint16_t  tx_size 
)

Transimit data in non-blocking mode with Interrupt.

Parameters
p_iso7816Pointer to an ISO7816 handle which contains the configuration information for the specified ISO7816.
tx_sizeBytes of data to transmit
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_iso7816_transmit_receive()

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.

Parameters
p_iso7816Pointer to an ISO7816 handle which contains the configuration information for the specified ISO7816.
tx_sizeBytes of data to transmit
rx_sizeBytes of data to receive
timeoutTimeout duration
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_iso7816_transmit_receive_it()

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.

Parameters
p_iso7816Pointer to an ISO7816 handle which contains the configuration information for the specified ISO7816.
tx_sizeBytes of data to transfer.
rx_sizeBytes of data to receive.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_iso7816_tx_cplt_callback()

void hal_iso7816_tx_cplt_callback ( iso7816_handle_t p_iso7816)

Tx Transfer completed callback.

Parameters
[in]p_iso7816Pointer to an ISO7816 handle which contains the configuration information for the specified ISO7816 module.

◆ hal_iso7816_tx_rx_cplt_callback()

void hal_iso7816_tx_rx_cplt_callback ( iso7816_handle_t p_iso7816)

Tx and Rx Transfer completed callback.

Parameters
[in]p_iso7816Pointer to an ISO7816 handle which contains the configuration information for the specified ISO7816 module.