/* Deinitializes the I2Cx peripheral registers to their default reset values.  */
void I2C_DeInit(I2C_TypeDef *I2Cx)
/* Deinitializes the I2Cx peripheral registers to their default reset values.  */
void I2C_DeInit(I2C_TypeDef *I2Cx)
{
  assert_param(IS_I2C_ALL_PERIPH(I2Cx));
  switch (*(uint32_t*)&I2Cx)
  {
  case I2C1_BASE:
    RCC_APB1PeriphResetCmd(RCC_APB1Periph_I2C1, ENABLE);
    RCC_APB1PeriphResetCmd(RCC_APB1Periph_I2C1, DISABLE);
    break;
  default:
    break;
  }
}