/* Read gyroscope integrated temperature sensor data. 
This function reads IMU-3000 integrated temperature sensor data. The temperature is always returned in scaled engineering units (degrees Celsius). */
static bool imu3000_get_temperature(sensor_hal_t *hal, sensor_data_t *data)
/* Read gyroscope integrated temperature sensor data. 
This function reads IMU-3000 integrated temperature sensor data. The temperature is always returned in scaled engineering units (degrees Celsius). */
static bool imu3000_get_temperature(sensor_hal_t *hal, sensor_data_t *data)
{
	int16_t temp_data;
	size_t const count = sensor_bus_read(hal, IMU3000_TEMP_OUT_H,
			&temp_data, sizeof(temp_data));
	data->temperature.value = (int16_t)be16_to_cpu(temp_data);
	if (data->scaled) {
		data->temperature.value -= TEMP_OFFSET;
		data->temperature.value /= TEMP_COUNTS_PER_DEG_C;
		data->temperature.value += TEMP_REF_DEG;
	}
	return (count == sizeof(temp_data));
}