DroneOS/Drivers/Source/drvBMPxxx.c
/*
 * This function starts the temperature measurement and returns the value
 * in tenth of a degree celsius.
 */
This function starts the temperature measurement and returns the value
in tenth of a degree celsius.
This function starts the temperature measurement and returns the value in tenth of a degree celsius .
static inline s32 bmp180_get_temperature(struct bmp180_data *data,
						int *temperature)
{
	struct bmp180_calibration_data *cali = &data->calibration;
	long x1, x2;
	int status;
	status = bmp180_update_raw_temperature(data);
	if (status != 0)
		goto exit;
	x1 = ((data->raw_temperature - cali->AC6) * cali->AC5) >> 15;
	x2 = (cali->MC << 11) / (x1 + cali->MD);
	data->b6 = x1 + x2 - 4000;
	if (temperature != NULL)
		*temperature = (x1+x2+8) >> 4;
exit:
	return status;
}
static inline s32 bmp180_get_temperature ( struct bmp180_data * data , int * temperature ) { struct bmp180_calibration_data * cali = & data -> calibration ; long x1 , x2 ; int status ; status = bmp180_update_raw_temperature ( data ) ; if ( status != 0 ) goto exit ; x1 = ( ( data -> raw_temperature - cali -> AC6 ) * cali -> AC5 ) >> 15 ; x2 = ( cali -> MC << 11 ) / ( x1 + cali -> MD ) ; data -> b6 = x1 + x2 - 4000 ; if ( temperature != NULL ) * temperature = ( x1 + x2 + 8 ) >> 4 ; exit : return status ; }
This function starts the temperature measurement and returns the value
 in tenth of a degree celsius.
This function starts the temperature measurement and returns the value in tenth of a degree celsius .
/* if NULL just update b6. Used for pressure only measurements */