/* Enables or disables I2C wakeup from stop mode.  */
void I2C_StopModeCmd(I2C_TypeDef *I2Cx, FunctionalState NewState)
/* Enables or disables I2C wakeup from stop mode.  */
void I2C_StopModeCmd(I2C_TypeDef *I2Cx, FunctionalState NewState)
{
  assert_param(IS_I2C_1_PERIPH(I2Cx));
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  if (NewState != DISABLE)
  {
    I2Cx->CR1 |= I2C_CR1_WUPEN;   
  }
  else
  {    
    I2Cx->CR1 &= (uint32_t)~((uint32_t)I2C_CR1_WUPEN); 
  }
}