/* Checks whether the specified I2C flag is set or not.  */
uint8_t I2C_ReadStatusFlag(I2C_T *i2c, I2C_FLAG_T flag)
/* Checks whether the specified I2C flag is set or not.  */
uint8_t I2C_ReadStatusFlag(I2C_T *i2c, I2C_FLAG_T flag)
{
    uint32_t status = 0;
    status = (uint32_t)(i2c->STS & (flag));
    if (status == flag )
    {
        return SET;
    }
    return RESET;
}