OPTIGA™ Trust M
Host Library Documentation
|
Module for the presentation layer of the Infineon I2C Protocol Stack library. More...
#include "ifx_i2c_config.h"
Go to the source code of this file.
Functions | |
optiga_lib_status_t | ifx_i2c_prl_init (ifx_i2c_context_t *p_ctx, ifx_i2c_event_handler_t handler) |
Function for initializing the module. More... | |
optiga_lib_status_t | ifx_i2c_prl_transceive (ifx_i2c_context_t *p_ctx, uint8_t *p_tx_data, uint16_t tx_data_len, uint8_t *p_rx_data, uint16_t *p_rx_data_len) |
Function to transmit and receive a packet. More... | |
optiga_lib_status_t | ifx_i2c_prl_close (ifx_i2c_context_t *p_ctx, ifx_i2c_event_handler_t handler) |
Function for closing the module. More... | |
Module for the presentation layer of the Infineon I2C Protocol Stack library.
Definition in file ifx_i2c_presentation_layer.h.
optiga_lib_status_t ifx_i2c_prl_close | ( | ifx_i2c_context_t * | p_ctx, |
ifx_i2c_event_handler_t | handler | ||
) |
Function for closing the module.
Function closes the module and registers an event handler to receive events from this module.
[in,out] | p_ctx | Pointer to ifx i2c context. |
[in] | handler | Function pointer to the event handler of the upper layer. |
IFX_I2C_STACK_SUCCESS | If initialization was successful. |
IFX_I2C_STACK_ERROR | If the module is already initialized. |
optiga_lib_status_t ifx_i2c_prl_init | ( | ifx_i2c_context_t * | p_ctx, |
ifx_i2c_event_handler_t | handler | ||
) |
Function for initializing the module.
Function initializes and enables the module
[in,out] | p_ctx | Pointer to ifx i2c context. |
[in] | handler | Function pointer to the event handler of the upper layer. |
IFX_I2C_STACK_SUCCESS | If initialization was successful. |
IFX_I2C_STACK_ERROR | If the module is already initialized. |
optiga_lib_status_t ifx_i2c_prl_transceive | ( | ifx_i2c_context_t * | p_ctx, |
uint8_t * | p_tx_data, | ||
uint16_t | tx_data_len, | ||
uint8_t * | p_rx_data, | ||
uint16_t * | p_rx_data_len | ||
) |
Function to transmit and receive a packet.
Asynchronous function to send and receive protected/unprotected packet
[in,out] | p_ctx | Pointer to ifx i2c context. |
[in] | p_tx_data | Pointer to the buffer containing the data to be transmitted. |
[in] | tx_data_len | Transmit data length. |
[in] | p_rx_data | Pointer to the buffer to store the data received. |
[in] | p_rx_data_len | Pointer to a variable to store the received data length |
IFX_I2C_STACK_SUCCESS | If function was successful. |
IFX_I2C_HANDSHAKE_ERROR | If establishing a secure channel fails. |
IFX_I2C_SESSION_ERROR | If an established secure channel is closed. |
IFX_I2C_STACK_ERROR | If the module is busy. |