Module for the transport layer of the Infineon I2C Protocol Stack library.
More...
Module for the transport layer of the Infineon I2C Protocol Stack library.
Function for initializing the module.
Function initializes and enables the module and registers an event handler to receive events from this module.
- Attention
- This function must be called before using the module.
- Parameters
-
[in] | handler | Function pointer to the event handler of the upper layer. |
- Return values
-
IFX_I2C_STACK_SUCCESS | If initialization was successful. |
IFX_I2C_STACK_ERROR | If the module is already initialized. |
uint16_t ifx_i2c_tl_transceive |
( |
uint8_t * |
p_packet_header, |
|
|
uint16_t |
packet_header_len, |
|
|
uint8_t * |
p_packet_payload, |
|
|
uint16_t |
packet_payload_len |
|
) |
| |
Function to transmit and receive a packet.
Asynchronous function to send 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
- Parameters
-
[in] | p_packet_header | Pointer to packet header. |
[in] | packet_header_len | Packet header length. |
[in,out] | p_packet_payload | Packet payload. |
[in] | packet_payload_len | Payload packet length. |
- Return values
-
IFX_I2C_STACK_SUCCESS | If function was successful. |
IFX_I2C_STACK_ERROR | If the module is busy. |