F439_CPP_BMP390_Barometric_Pressure_and_Altimeter_01 1.0
STM32F439 BMP390 barometric pressure and altimeter tutorial
Loading...
Searching...
No Matches
Sensor Data

Get Sensor data.

Get Sensor data.

bmp3_get_sensor_data

int8_t bmp3_get_sensor_data(uint8_t sensor_comp, struct bmp3_data *data, struct bmp3_dev *dev);
This API reads the pressure, temperature or both data from the sensor, compensates the data and store it in the bmp3_data structure instance passed by the user.
Parameters
[in]sensor_comp: Variable which selects which data to be read from the sensor.
* sensor_comp |   Macros
* ------------|-------------------
*     1       | BMP3_PRESS
*     2       | BMP3_TEMP
*     3       | BMP3_ALL
*
Parameters
[out]data: Structure instance of bmp3_data.
[in]dev: Structure instance of bmp3_dev.
Note
: For fixed point the compensated temperature and pressure has a multiplication factor of 100. Units are degree celsius and Pascal respectively. ie. If temperature is 2426 then temperature is 24.26 deg C If press is 9528709, then pressure is 95287.09 Pascal.
Returns
Result of API execution status
Return values
0-> Success
>0-> Warning
<0-> Error