/* Writes the specified register reg with the reg_value passed.  */
void at30tse_write_register(uint8_t reg, uint8_t reg_type, uint8_t reg_size, uint16_t reg_value)
/* Writes the specified register reg with the reg_value passed.  */
void at30tse_write_register(uint8_t reg, uint8_t reg_type, uint8_t reg_size, uint16_t reg_value)
{
	uint8_t data[3];
	data[0] = reg | reg_type;
	data[1] = 0x00FF & (reg_value >> 8);
	data[2] = 0x00FF & reg_value;
    struct i2c_master_packet transfer = {
		.address     = AT30TSE_TEMPERATURE_TWI_ADDR,
		.data_length = 1 + reg_size,
		.data        = data,
	};
	i2c_master_write_packet_wait(&dev_inst_at30tse75x, &transfer);
}