/* Set the I2C peripheral registers to their default reset values.  */
void I2C_Reset(I2C_T *i2c)
/* Set the I2C peripheral registers to their default reset values.  */
void I2C_Reset(I2C_T *i2c)
{
    if (i2c == I2C1)
    {
        RCM_EnableAPB1PeriphReset(RCM_APB1_PERIPH_I2C1);
        RCM_DisableAPB1PeriphReset(RCM_APB1_PERIPH_I2C1);
    }
    else
    {
        RCM_EnableAPB1PeriphReset(RCM_APB1_PERIPH_I2C2);
        RCM_DisableAPB1PeriphReset(RCM_APB1_PERIPH_I2C2);
    }
}