/* Configures the Digital noise filter of I2C peripheral.  */
void I2C_DigitalFilterConfig(I2C_TypeDef *I2Cx, uint16_t I2C_DigitalFilter)
/* Configures the Digital noise filter of I2C peripheral.  */
void I2C_DigitalFilterConfig(I2C_TypeDef *I2Cx, uint16_t I2C_DigitalFilter)
{
  uint16_t tmpreg = 0;
  assert_param(IS_I2C_ALL_PERIPH(I2Cx));
  assert_param(IS_I2C_DIGITAL_FILTER(I2C_DigitalFilter));
  tmpreg = I2Cx->FLTR;
  tmpreg &= (uint16_t)~((uint16_t)I2C_FLTR_DNF);
  tmpreg |= (uint16_t)((uint16_t)I2C_DigitalFilter & I2C_FLTR_DNF);
  I2Cx->FLTR = tmpreg;
}