OPTIGA™ Trust M
Host Library Documentation
ifx_i2c_transport_layer.h File Reference

This file defines the API prototype for transport layer of the Infineon I2C Protocol Stack library. More...

Include dependency graph for ifx_i2c_transport_layer.h:

Go to the source code of this file.

Functions

optiga_lib_status_t ifx_i2c_tl_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_tl_transceive (ifx_i2c_context_t *p_ctx, uint8_t *p_packet, uint16_t packet_len, uint8_t *p_recv_packet, uint16_t *p_recv_packet_len)
 Function to transmit and receive a packet. More...
 

Detailed Description

This file defines the API prototype for transport layer of the Infineon I2C Protocol Stack library.

Author
Infineon Technologies AG

Definition in file ifx_i2c_transport_layer.h.

Function Documentation

◆ ifx_i2c_tl_init()

optiga_lib_status_t ifx_i2c_tl_init ( ifx_i2c_context_t p_ctx,
ifx_i2c_event_handler_t  handler 
)

Function for initializing the module.

Function initializes and enables the module and registers an event handler to receive events from this module.

Precondition
  • This function must be called before using the module.
Note
  • None
Parameters
[in,out]p_ctxPointer to ifx i2c context.
[in]handlerFunction pointer to the event handler of the upper layer.
Return values
IFX_I2C_STACK_SUCCESSIf initialization was successful.
IFX_I2C_STACK_ERRORIf the module is already initialized.

◆ ifx_i2c_tl_transceive()

optiga_lib_status_t ifx_i2c_tl_transceive ( ifx_i2c_context_t p_ctx,
uint8_t *  p_packet,
uint16_t  packet_len,
uint8_t *  p_recv_packet,
uint16_t *  p_recv_packet_len 
)

Function to transmit and receive a packet.

  • The function returns immediately.
  • One of the following events is propagated to the event handler registered with ifx_i2c_tl_init
Precondition
  • This function must be called before using the module.
Note
  • None
Parameters
[in,out]p_ctxPointer to ifx i2c context.
[in]p_packetBuffer containing the packet header.
[in]packet_lenPacket header length.
[in]p_recv_packetBuffer containing the packet payload.
[in]p_recv_packet_lenPacket payload length.
Return values
IFX_I2C_STACK_SUCCESSIf function was successful.
IFX_I2C_STACK_ERRORIf the module is busy.