i2cModeMaster,/*!< Master mode : In Master mode, the I2C interface initiates a data transfer and generates the clock signal. */
i2cModeMultyMaster,/*!< Multimaster Mode : In case if more than one master are present in one I2C bus, In such case each device needs to be able to cooperate with the fact that another device is currently talking and the bus is therefore busy (Arbirtation). For More information : https://www.i2c-bus.org/multimaster/ */
i2cModeSlave/*!< Slave mode : A slave device has to always be ready to detect and process a start condition and to recognize its address */
}i2cMode_t;
/*! Enum of possible I2C speeds */
typedefenum{
i2cSpeedStandart,/*!< SM 100 kbits/s This is the stantrd spped for any standart i2c Applications */
i2cAddressCountSingle,/*!< Only one adress for communication */
i2cAddressCountDual/*!< Dual adresses for one device respondng to two adresses */
}i2cAddressCount_t;
/*! Enum for clock strechning activation. Can only be implmented as Slave for more information : https://www.i2c-bus.org/clock-stretching/ */
typedefenum{
i2cClockStrechingEnable,/*!< In situations where an I2C slave is not able to co-operate with the clock speed given by the master and needs to slow down a little. This is done by a mechanism referred to as clock stretching. */
i2cCLockStrechingDisable/*!< We assume that the master and slave have compatible Clock frequencies */
}i2cClockStreching_t;
typedefstruct
{
uint16_tadress;/*!< First and Main address of the device */
i2cAddressSize_tadressSize;/*!< 10 or 7 bit adress size */
i2cAddressCount_taddresCount;/*!< SIngle or multiple */
i2cMode_tmode;/*!< Master, Slave or Multymaster Modes */
i2cSpeed_tspeed;/*!< Bus Speed */
i2cClockStreching_tstreching;/*!< Clock Streching enablede or disabled*/
uint32_ttiming;/*!< Specifies the I2C timing The timings must be configured