![]() |
OPTIGA™ Trust M
Host Library Documentation
|
This file defines the API prototype for IFX I2C protocol v2.00 wrapper. More...

Go to the source code of this file.
| enum | ifx_i2c_reset_type { IFX_I2C_COLD_RESET = 0U, IFX_I2C_SOFT_RESET = 1U, IFX_I2C_WARM_RESET = 2U } |
| IFX I2C Reset types. More... | |
| typedef enum ifx_i2c_reset_type | ifx_i2c_reset_type_t |
| IFX I2C Reset types. More... | |
| optiga_lib_status_t | ifx_i2c_open (ifx_i2c_context_t *p_ctx) |
| Initializes the IFX I2C protocol stack for a given context. More... | |
| optiga_lib_status_t | ifx_i2c_reset (ifx_i2c_context_t *p_ctx, ifx_i2c_reset_type_t reset_type) |
| Resets the I2C slave. More... | |
| optiga_lib_status_t | ifx_i2c_transceive (ifx_i2c_context_t *p_ctx, const uint8_t *p_tx_data, uint16_t tx_data_length, uint8_t *p_rx_buffer, uint16_t *p_rx_buffer_len) |
| Sends a command and receives a response for the command. More... | |
| optiga_lib_status_t | ifx_i2c_close (ifx_i2c_context_t *p_ctx) |
| Closes the IFX I2C protocol stack for a given context. More... | |
| optiga_lib_status_t | ifx_i2c_set_slave_address (ifx_i2c_context_t *p_ctx, uint8_t slave_address, uint8_t persistent) |
| Sets the slave address of the target device. More... | |
This file defines the API prototype for IFX I2C protocol v2.00 wrapper.
Definition in file ifx_i2c.h.
| typedef enum ifx_i2c_reset_type ifx_i2c_reset_type_t |
IFX I2C Reset types.
| enum ifx_i2c_reset_type |
| optiga_lib_status_t ifx_i2c_close | ( | ifx_i2c_context_t * | p_ctx | ) |
Closes the IFX I2C protocol stack for a given context.
Closes the IFX I2C protocol stack for a given context.
| [in,out] | p_ctx | Pointer to ifx_i2c_context_t, must not be NULL |
| IFX_I2C_STACK_SUCCESS |
| optiga_lib_status_t ifx_i2c_open | ( | ifx_i2c_context_t * | p_ctx | ) |
Initializes the IFX I2C protocol stack for a given context.
Initializes the IFX I2C protocol stack for the given context.
| [in,out] | p_ctx | Pointer to ifx_i2c_context_t, must not be NULL |
| IFX_I2C_STACK_SUCCESS | |
| IFX_I2C_STACK_ERROR |
| optiga_lib_status_t ifx_i2c_reset | ( | ifx_i2c_context_t * | p_ctx, |
| ifx_i2c_reset_type_t | reset_type | ||
| ) |
Resets the I2C slave.
Resets the I2C slave and initializes the IFX I2C protocol stack for the given context.
| [in,out] | p_ctx | Pointer to ifx_i2c_context_t, must not be NULL |
| [in,out] | reset_type | type of reset |
| IFX_I2C_STACK_SUCCESS | |
| IFX_I2C_STACK_ERROR |
| optiga_lib_status_t ifx_i2c_set_slave_address | ( | ifx_i2c_context_t * | p_ctx, |
| uint8_t | slave_address, | ||
| uint8_t | persistent | ||
| ) |
Sets the slave address of the target device.
Writes new I2C slave Address to the target device.
| [in,out] | p_ctx | Pointer to ifx_i2c_context_t |
| [in] | slave_address | Holds new slave address[7 Bit] to be set. |
| [in] | persistent | 0 - To set the Slave address until next reset. Non-zero - To set the slave address to persistent memory. |
| IFX_I2C_STACK_SUCCESS | |
| IFX_I2C_STACK_ERROR |
| optiga_lib_status_t ifx_i2c_transceive | ( | ifx_i2c_context_t * | p_ctx, |
| const uint8_t * | p_tx_data, | ||
| uint16_t | tx_data_length, | ||
| uint8_t * | p_rx_buffer, | ||
| uint16_t * | p_rx_buffer_len | ||
| ) |
Sends a command and receives a response for the command.
Sends a command and receives a response for the command.
| [in,out] | p_ctx | Pointer to ifx_i2c_context_t, must not be NULL |
| [in] | p_tx_data | Pointer to the write transmit buffer |
| [in] | tx_data_length | Length of the write data buffer |
| [in,out] | p_rx_buffer | Pointer to the receive data buffer |
| [in,out] | p_rx_buffer_len | Pointer to the length of the receive data buffer |