Module for the data link layer of the Infineon I2C Protocol Stack library. More...
Macros |
|
| #define | IFX_I2C_DL_EVENT_ERROR 0x01 |
|
Error event propagated to upper layer.
|
|
| #define | IFX_I2C_DL_EVENT_TX_SUCCESS 0x02 |
|
Transmit success event propagated to upper layer.
|
|
| #define | IFX_I2C_DL_EVENT_RX_SUCCESS 0x04 |
|
Receive success event propagated to upper layer.
|
|
Functions |
|
| uint16_t | ifx_i2c_dl_init ( ifx_i2c_event_handler_t handler) |
|
Function for initializing the module.
More...
|
|
| uint16_t | ifx_i2c_dl_send_frame (uint8_t *p_frame, uint16_t frame_len) |
|
Function for sending a frame.
More...
|
|
| uint16_t | ifx_i2c_dl_receive_frame (void) |
|
Function for receiving a frame.
More...
|
|
Detailed Description
Module for the data link layer of the Infineon I2C Protocol Stack library.
Function Documentation
| uint16_t ifx_i2c_dl_init | ( | 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.
- 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_dl_receive_frame | ( | void | ) |
Function for receiving a frame.
Asynchronous function to receive a frame. The function returns immediately. One of the following events is propagated to the event handler registered with ifx_i2c_dl_init .
- Return values
-
IFX_I2C_STACK_SUCCESS If function was successful. IFX_I2C_STACK_ERROR If the module is busy.
| uint16_t ifx_i2c_dl_send_frame | ( | uint8_t * | p_frame , |
| uint16_t | frame_len | ||
| ) |
Function for sending a frame.
Asynchronous function to send a frame. The function returns immediately. One of the following events is propagated to the event handler registered with ifx_i2c_dl_init .
- Parameters
-
[in] p_frame Pointer to buffer containing the frame. [in] frame_len Frame length.
- Return values
-
IFX_I2C_STACK_SUCCESS If function was successful. IFX_I2C_STACK_ERROR If the module is busy.