/* Enable Time-out Counter Function and support Long Time-out.  */
void I2C_EnableTimeout(I2C_T *i2c, uint8_t u8LongTimeout)
/* Enable Time-out Counter Function and support Long Time-out.  */
void I2C_EnableTimeout(I2C_T *i2c, uint8_t u8LongTimeout)
{
    if(u8LongTimeout)
    {
        i2c->TOCTL |= I2C_TOCTL_TOCDIV4_Msk;
    }
    else
    {
        i2c->TOCTL &= ~I2C_TOCTL_TOCDIV4_Msk;
    }
    i2c->TOCTL |= I2C_TOCTL_TOCEN_Msk;
}