OPTIGA™ Trust M
Host Library Documentation
|
This file defines the API prototype for physical 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_pl_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_pl_send_frame (ifx_i2c_context_t *p_ctx, uint8_t *p_frame, uint16_t frame_len) |
Function for sending a frame. More... | |
optiga_lib_status_t | ifx_i2c_pl_receive_frame (ifx_i2c_context_t *p_ctx) |
Function for receiving a frame. More... | |
optiga_lib_status_t | ifx_i2c_pl_write_slave_address (ifx_i2c_context_t *p_ctx, uint8_t slave_address, uint8_t storage_type) |
Function for setting slave address. More... | |
This file defines the API prototype for physical layer of the Infineon I2C Protocol Stack library.
Definition in file ifx_i2c_physical_layer.h.
optiga_lib_status_t ifx_i2c_pl_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_pl_receive_frame | ( | ifx_i2c_context_t * | p_ctx | ) |
Function for receiving a frame.
Asynchronous function to receive a frame
[in] | 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_pl_send_frame | ( | ifx_i2c_context_t * | p_ctx, |
uint8_t * | p_frame, | ||
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] | p_frame | Buffer containing the frame. |
[in] | frame_len | Frame length. |
IFX_I2C_STACK_SUCCESS | If function was successful. |
IFX_I2C_STACK_ERROR | If the module is busy. |
optiga_lib_status_t ifx_i2c_pl_write_slave_address | ( | ifx_i2c_context_t * | p_ctx, |
uint8_t | slave_address, | ||
uint8_t | storage_type | ||
) |
Function for setting slave address.
Synchronous function to set slave address.
[in] | p_ctx | Pointer to IFX I2C context. |
[in] | slave_address | Holds new slave address[7 Bit] to be set. |
[in] | storage_type | 0: To set the Slave address until next reset. Non-zero: To set the slave address to persistent memory. |
IFX_I2C_STACK_SUCCESS | If function was successful. |
IFX_I2C_STACK_ERROR | If setting slave address fails. |