/* Checks whether the specified I2C flag is set or not.  */
u8 I2C_CheckFlagState(I2C_TypeDef *I2Cx, u32 I2C_FLAG)
/* Checks whether the specified I2C flag is set or not.  */
u8 I2C_CheckFlagState(I2C_TypeDef *I2Cx, u32 I2C_FLAG)
{
	u8 bit_status = 0;
	assert_param(IS_I2C_ALL_PERIPH(I2Cx));
	if((I2Cx->IC_STATUS & I2C_FLAG) != 0)
	{
		bit_status = 1;
	}
	return  bit_status;
}