OPTIGA™ Trust M
Host Library Documentation
|
This file defines the API prototype for data link layer of the Infineon I2C Protocol Stack library. More...
#include "ifx_i2c_config.h"
Go to the source code of this file.
#define | IFX_I2C_DL_EVENT_ERROR (0x01) |
Error event propagated to upper layer. More... | |
#define | IFX_I2C_DL_EVENT_TX_SUCCESS (0x02) |
Transmit success event propagated to upper layer (bit field 1) More... | |
#define | IFX_I2C_DL_EVENT_RX_SUCCESS (0x04) |
Receive success event propagated to upper layer (bit field 3) More... | |
optiga_lib_status_t | ifx_i2c_dl_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_dl_send_frame (ifx_i2c_context_t *p_ctx, uint16_t frame_len) |
Function for sending a frame. More... | |
optiga_lib_status_t | ifx_i2c_dl_receive_frame (ifx_i2c_context_t *p_ctx) |
Function for receiving a frame. More... | |
This file defines the API prototype for data link layer of the Infineon I2C Protocol Stack library.
Definition in file ifx_i2c_data_link_layer.h.
#define IFX_I2C_DL_EVENT_ERROR (0x01) |
Error event propagated to upper layer.
Definition at line 48 of file ifx_i2c_data_link_layer.h.
#define IFX_I2C_DL_EVENT_RX_SUCCESS (0x04) |
Receive success event propagated to upper layer (bit field 3)
Definition at line 52 of file ifx_i2c_data_link_layer.h.
#define IFX_I2C_DL_EVENT_TX_SUCCESS (0x02) |
Transmit success event propagated to upper layer (bit field 1)
Definition at line 50 of file ifx_i2c_data_link_layer.h.
optiga_lib_status_t ifx_i2c_dl_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.
[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_dl_receive_frame | ( | ifx_i2c_context_t * | p_ctx | ) |
Function for receiving a frame.
Asynchronous function to receive a frame
[in,out] | p_ctx | Pointer to ifx i2c context. |
IFX_I2C_STACK_SUCCESS | If function was successful. |
IFX_I2C_STACK_ERROR | If the module is busy. |
optiga_lib_status_t ifx_i2c_dl_send_frame | ( | ifx_i2c_context_t * | p_ctx, |
uint16_t | frame_len | ||
) |
Function for sending a frame.
Asynchronous function to send a frame
[in,out] | p_ctx | Pointer to ifx i2c context. |
[in] | frame_len | Frame length. |
IFX_I2C_STACK_SUCCESS | If function was successful. |
IFX_I2C_STACK_ERROR | If the module is busy. |