/* Transmits the address byte to select the slave device.  */
void I2C_Send7bitAddress(I2C_TypeDef *i2c, u8 addr, u8 dir)
/* Transmits the address byte to select the slave device.  */
void I2C_Send7bitAddress(I2C_TypeDef *i2c, u8 addr, u8 dir)
{
    i2c->IC_TAR = addr >> 1;
}