Module for the data link layer of the Infineon I2C Protocol Stack library.
More...
|
typedef void(* | IFX_I2C_EventHandler )(uint8_t event) |
| Function pointer type for upper layer event handler.
|
|
typedef void(* | IFX_Timer_Callback )(void) |
| Callback function to handle elapsed timer.
|
|
Module for the data link layer of the Infineon I2C Protocol Stack library.
Function for initializing a HAL module.
The function initializes a HAL module.
- Parameters
-
reinit | If 1, the call shal re-initializes the HAL module if it was used before. If 0, the module is initialized for the first time. |
handler | Event handler to propagate events to the upper layer |
void ifx_i2c_receive |
( |
uint8_t * |
p_data, |
|
|
uint16_t |
length |
|
) |
| |
I2C receive function to conduct an I2 read on I2C bus.
The function conducts an I2C read on the I2C bus.
- Parameters
-
p_data | Pointer to buffer where received data shall be stored. |
length | Number of bytes to read from I2C slave. |
void ifx_i2c_transmit |
( |
uint8_t * |
p_data, |
|
|
uint16_t |
length |
|
) |
| |
I2C transmit function to conduct an I2 write on I2C bus.
The function conducts an I2C write on the I2C bus.
- Parameters
-
p_data | Pointer to buffer with data to be written to I2C slave. |
length | Length of data in data buffer. |
Timer setup function to initialize and start a timer.
The function initializes and starts a timer that will call callback_function after time_ms milliseconds have elapsed.
- Parameters
-
time_us | Time in microseconds after the timer expires. |
callback_function | Function to be called once timer expired. |