/* Enables or disables I2C Idle Clock Timeout (Bus idle SCL and SDA high detection).  */
void I2C_IdleClockTimeoutCmd(I2C_TypeDef *I2Cx, FunctionalState NewState)
/* Enables or disables I2C Idle Clock Timeout (Bus idle SCL and SDA high detection).  */
void I2C_IdleClockTimeoutCmd(I2C_TypeDef *I2Cx, FunctionalState NewState)
{
    assert_param(IS_I2C_1_PERIPH(I2Cx));
    assert_param(IS_FUNCTIONAL_STATE(NewState));
    if (NewState != DISABLE)
    {
        I2Cx->TIMEOUTR |= I2C_TIMEOUTR_TIDLE;
    }
    else
    {
        I2Cx->TIMEOUTR &= (uint32_t)~((uint32_t)I2C_TIMEOUTR_TIDLE);
    }
}