/* Get an uncompensated temperature (UT) reading. 
This routine gets a raw temperature sample reading from the a BMP085 or BMP180 device. In the event of a sensor or bus error, a 32-bit value of -1 (all bits set) may be returned from this routine. */
static int32_t bmp_get_ut(sensor_hal_t *hal)
/* Get an uncompensated temperature (UT) reading. 
This routine gets a raw temperature sample reading from the a BMP085 or BMP180 device. In the event of a sensor or bus error, a 32-bit value of -1 (all bits set) may be returned from this routine. */
static int32_t bmp_get_ut(sensor_hal_t *hal)
{
	int32_t UT = -1;
	uint8_t buff[2];
	sensor_bus_put(hal, BMP_CONTROL, BMP_TEMP_READ);
	delay_ms(5);
	if (sensor_bus_read(hal, BMP_DATA_MSB, buff, sizeof(buff))) {
		UT = ((uint32_t)buff[0] << 8) | buff[1];
	}
	return UT;
}