Implementation
Configuring the I
2
C module
The function
IfxI2c_I2c_initConfig()
initializes an instance of the structure
IfxI2c_I2c_Config
with its default values.
The
IfxI2c_I2c_Config
structure allows setting the parameters to initialize the
module:
›
baudrate
– to set the clock speed in bit/s. Typical values are 100 kbit/s in
standard mode, 400 kbit/s in fast mode and 3.4 Mbit/s in high-speed mode.
›
pins
– a structure to set the port pins used for the communication.
A serial data line (SDA) and a serial clock line (SCL) carry the information
between the devices, therefore two port pins are required.
The function
IfxI2c_I2c_initModule()
initializes and activates the I2C module
with the user configuration in master mode.
The functions above are provided by the iLLD header
IfxI2c_I2c.h
.
6
2019-10-17
Copyright © Infineon Technologies AG 2019. All rights reserved.