8 i2c_read_register(u8 mem_address, u8 *data_read)
{
	u8 temp = 0;
	u8 ack = 0;
	u8 device_address = (IQS_ADDR << 1);
	u8 polling_attempt = 0;

	// send address
	ack = i2c_send_byte(device_address);
#ifdef POLLING
	while ((ack) && (polling_attempt < POLLING_ATTEMPTS))
	{
 i2c_wait();
 i2c_wait();
		i2c_start();
		ack = i2c_send_byte(device_address);
		polling_attempt++;
	}
#endif
	if (!ack)
	{
		i2c_send_byte(mem_address);
		i2c_repeat_start();
		device_address = (IQS_ADDR << 1) | 0x01;
		ack = i2c_send_byte(device_address);
		temp = i2c_read_byte(1);
		(*data_read) = temp;
	}

	return ack;
}