i2cCLockStrechingDisable/*!< We assume that the master and slave have compatible Clock frequencies */
i2cCLockStrechingDisable/*!< We assume that the master and slave have compatible Clock frequencies */
}i2cClockStreching_t;
}i2cClockStreching_t;
/*! typedef for the i2c states*/
typedefenum
{
i2cNotInitialized,/*!< Peripheral is not yet Initialized */
i2cReady,/*!< Peripheral Initialized and ready for use */
i2cBusy,/*!< An internal process is ongoing */
i2cTransmitting,/*!< Data Transmission process is ongoing */
i2cRecieving,/*!< Data Reception process is ongoing */
i2cListening,/*!< Address Listen Mode is ongoing */
i2cListeningAndTransmitting,/*!< Address Listen Mode and Data Transmission process is ongoing */
i2cListeningAndRecieveing,/*!< Address Listen Mode and Data Reception process is ongoing*/
i2cAbort,/*!< Abort user request ongoing */
i2cTimeout,/*!< Timeout state */
i2cError/*!< Error */
}i2cState_t;
/*! Struture a an i2c channel with all the required propereties*/
typedefstruct
typedefstruct
{
{
uint16_tadress;/*!< First and Main address of the device */
uint16_tadress;/*!< First and Main address of the device */
i2cAddressSize_tadressSize;/*!< 10 or 7 bit adress size */
i2cAddressSize_tadressSize;/*!< 10 or 7 bit adress size */
i2cAddressCount_taddresCount;/*!< SIngle or multiple */
i2cAddressCount_taddresCount;/*!< SIngle or multiple */
i2cMode_tmode;/*!< Master, Slave or Multymaster Modes */
i2cMode_tmode;/*!< Master, Slave or Multymaster Modes */
i2cSpeed_tspeed;/*!< Bus Speed */
i2cSpeed_tspeed;/*!< Bus Speed */
i2cClockStreching_tstreching;/*!< Clock Streching enablede or disabled*/
i2cClockStreching_tstreching;/*!< Clock Streching enablede or disabled*/
uint32_ttiming;/*!< Specifies the I2C timing The timings must be configured
uint32_ttiming;/*!< Specifies the I2C timing The timings must be configured in order to guarantee a correct data hold and setup time, used in master and slave modes. */