/* get the data stored in data register of I2C module  */
u8 tls_i2c_read_byte(u8 ifack, u8 ifstop)
/* get the data stored in data register of I2C module  */
u8 tls_i2c_read_byte(u8 ifack, u8 ifstop)
{
	u8 data;
	u32 value = I2C_CR_RD;
	if(!ifack)
		value |= I2C_CR_NAK;
	if(ifstop)
		value |= I2C_CR_STO;
	tls_reg_write32(HR_I2C_CR_SR, value);
	while(tls_reg_read32(HR_I2C_CR_SR) & I2C_SR_TIP);
	data = tls_reg_read32(HR_I2C_TX_RX);
	return data;
}