/* Clock-gated I2C clock domain for address matching interrupts wake up.  */
void I2C_Sleep_Cmd(I2C_TypeDef *I2Cx, u32 NewStatus)
/* Clock-gated I2C clock domain for address matching interrupts wake up.  */
void I2C_Sleep_Cmd(I2C_TypeDef *I2Cx, u32 NewStatus)
{
	assert_param(IS_I2C_ALL_PERIPH(I2Cx));
	if (NewStatus != DISABLE) {
		I2C_INTConfig(I2Cx, BIT_IC_INTR_MASK_M_ADDR_1_MATCH|BIT_IC_INTR_MASK_M_ADDR_2_MATCH, ENABLE);
		I2Cx->IC_SLEEP |= BIT_IC_SLEEP_CLOCK_CONTROL;
	} else {
		I2C_INTConfig(I2Cx, BIT_IC_INTR_MASK_M_ADDR_1_MATCH|BIT_IC_INTR_MASK_M_ADDR_2_MATCH, DISABLE);
		I2Cx->IC_SLEEP &= ~BIT_IC_SLEEP_CLOCK_CONTROL;
	}
}