/* Set I2C peripheral registers to their default reset values.  */
void SCI2C_Reset(SCI2C_T *i2c)
/* Set I2C peripheral registers to their default reset values.  */
void SCI2C_Reset(SCI2C_T *i2c)
{
    if(i2c == I2C3)
    {
        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);
    }
    i2c->SW = 0;
    i2c->SW = 1;
    i2c->INTEN = 0;
}