Functions
Functions
Peripheral Driver » APP DRIVER » ISO7816
Collaboration diagram for Functions:

## Functions
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 and app_iso7816_evt_handler_t. More...
uint16_t | app_iso7816_deinit (void)
| De-initialize the APP ISO7816 DRIVER peripheral. More...
uint16_t | app_iso7816_receive_sync (uint16_t size, uint32_t timeout)
| Receive an amount of data in blocking mode. More...
uint16_t | app_iso7816_receive_async (uint16_t size)
| Receive an amount of data in non-blocking mode with Interrupt/DMA. More...
uint16_t | app_iso7816_transmit_sync (uint16_t size, uint32_t timeout)
| Transmits an amount of data in blocking mode. More...
uint16_t | app_iso7816_transmit_async (uint16_t size)
| Transmits an amount of data in non-blocking mode with Interrupt/DMA. More...
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. More...
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. More...
uint16_t | app_iso7816_set_action (uint32_t action)
| Request ISO7816 to go to the next action. More...
uint32_t | app_iso7816_get_power_states (void)
| Get ISO7816 Power States. More...
uint16_t | app_iso7816_set_etudiv (uint32_t divide)
| Set divide ISO7816 clock. More...
iso7816_handle_t * | app_iso7816_get_handle (void)
| Return the ISO7816 handle. More...

## Detailed Description

## Function Documentation

## ◆ app_iso7816_deinit()

uint16_t app_iso7816_deinit | ( | void |  | ) |

De-initialize the APP ISO7816 DRIVER peripheral.

Returns
  Result of De-initialization.

## ◆ app_iso7816_get_handle()

iso7816_handle_t* app_iso7816_get_handle | ( | void |  | ) |

Return the ISO7816 handle.

Returns
  Pointer to the specified ID's ISO7816 handle.

## ◆ app_iso7816_get_power_states()

uint32_t app_iso7816_get_power_states | ( | void |  | ) |

Get ISO7816 Power States.

Returns
  Returned value can be one of the following values:
  - APP_ISO7816_PWR_STATE_OFF
  - APP_ISO7816_PWR_STATE_PWRUP_VCC
  - APP_ISO7816_PWR_STATE_PWRUP_RST
  - APP_ISO7816_PWR_STATE_PWRDN_RST
  - APP_ISO7816_PWR_STATE_PWRDN_VCC
  - APP_ISO7816_PWR_STATE_STOP_PRE
  - APP_ISO7816_PWR_STATE_STOP
  - APP_ISO7816_PWR_STATE_STOP_POST
  - APP_ISO7816_PWR_STATE_IDLE
  - APP_ISO7816_PWR_STATE_RX_TS0
  - APP_ISO7816_PWR_STATE_RX_TS1
  - APP_ISO7816_PWR_STATE_RX
  - APP_ISO7816_PWR_STATE_TX
  - APP_ISO7816_PWR_STATE_TX_RX

## ◆ app_iso7816_init()

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 and app_iso7816_evt_handler_t.

Note
  If interrupt mode is set, you can use blocking mode. Conversely, if blocking mode is set, you can't use interrupt mode.

Parameters

  [in] | p_params | Pointer to app_iso7816_params_t parameter which contains the configuration information for the specified ISO7816 module.
  [in] | evt_handler | ISO7816 user callback function.

Returns
  Result of initialization.

## ◆ app_iso7816_receive_async()

uint16_t app_iso7816_receive_async | ( | uint16_t | size | ) |

Receive an amount of data in non-blocking mode with Interrupt/DMA.

Parameters

  [in] | size | Amount of data to be sent

Returns
  Result of operation.

## ◆ app_iso7816_receive_sync()

uint16_t app_iso7816_receive_sync | ( | uint16_t | size,
|  | uint32_t | timeout
| ) |  |

Receive an amount of data in blocking mode.

Parameters

  [in] | size | Amount of data to be sent
  [in] | timeout | Timeout duration

Returns
  Result of operation.

## ◆ app_iso7816_set_action()

uint16_t app_iso7816_set_action | ( | uint32_t | action | ) |

Request ISO7816 to go to the next action.

Parameters

  action | This parameter can be one of the following values: APP_ISO7816_ACTION_NONE APP_ISO7816_ACTION_OFF APP_ISO7816_ACTION_STOPCLK APP_ISO7816_ACTION_ON APP_ISO7816_ACTION_WARMRST APP_ISO7816_ACTION_RX APP_ISO7816_ACTION_TX APP_ISO7816_ACTION_TXRX

Returns
  Result of operation.

## ◆ app_iso7816_set_etudiv()

uint16_t app_iso7816_set_etudiv | ( | 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

  divide | This parameter should range between 0x0 and 0x3FF.

Returns
  Result of operation.

## ◆ app_iso7816_transmit_async()

uint16_t app_iso7816_transmit_async | ( | uint16_t | size | ) |

Transmits an amount of data in non-blocking mode with Interrupt/DMA.

Parameters

  [in] | size | Amount of data to be sent

Returns
  Result of operation.

## ◆ app_iso7816_transmit_receive_async()

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.

Parameters

  [in] | tx_size | Amount of data to be sent
  [in] | rx_size | Amount of data to be receive

Returns
  Result of operation.

## ◆ app_iso7816_transmit_receive_sync()

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.

Parameters

  [in] | tx_size | Amount of data to be sent
  [in] | rx_size | Amount of data to be receive
  [in] | timeout | Timeout duration

Returns
  Result of operation.

## ◆ app_iso7816_transmit_sync()

uint16_t app_iso7816_transmit_sync | ( | uint16_t | size,
|  | uint32_t | timeout
| ) |  |

Transmits an amount of data in blocking mode.

Parameters

  [in] | size | Amount of data to be sent
  [in] | timeout | Timeout duration

Returns
  Result of operation.