PX4 Firmware
PX4 Autopilot Software http://px4.io
bmp388.cpp File Reference

Driver for the BMP388 barometric pressure sensor connected via I2C (SPI still TODO/test). More...

#include "bmp388.h"
Include dependency graph for bmp388.cpp:

Go to the source code of this file.

Functions

static int8_t cal_crc (uint8_t seed, uint8_t data)
 
static void parse_sensor_data (const uint8_t *reg_data, struct bmp3_uncomp_data *uncomp_data)
 This internal API is used to parse the pressure or temperature or both the data and store it in the bmp3_uncomp_data structure instance. More...
 
static int64_t compensate_temperature (const struct bmp3_uncomp_data *uncomp_data, struct bmp3_calib_data *calib_data)
 This internal API is used to compensate the raw temperature data and return the compensated temperature data in integer data type. For eg if returned temperature is 2426 then it is 2426/100 = 24.26 deg Celsius. More...
 
static uint64_t compensate_pressure (const struct bmp3_uncomp_data *uncomp_data, const struct bmp3_calib_data *calib_data)
 This internal API is used to compensate the raw pressure data and return the compensated pressure data in integer data type. for eg return if pressure is 9528709 which is 9528709/100 = 95287.09 Pascal or 952.8709 hecto Pascal. More...
 

Detailed Description

Driver for the BMP388 barometric pressure sensor connected via I2C (SPI still TODO/test).

Refer to: https://github.com/BoschSensortec/BMP3-Sensor-API

Definition in file bmp388.cpp.

Function Documentation

◆ cal_crc()

static int8_t cal_crc ( uint8_t  seed,
uint8_t  data 
)
static

Definition at line 248 of file bmp388.cpp.

Referenced by BMP388::validate_trimming_param().

Here is the caller graph for this function:

◆ compensate_pressure()

static uint64_t compensate_pressure ( const struct bmp3_uncomp_data uncomp_data,
const struct bmp3_calib_data calib_data 
)
static

This internal API is used to compensate the raw pressure data and return the compensated pressure data in integer data type. for eg return if pressure is 9528709 which is 9528709/100 = 95287.09 Pascal or 952.8709 hecto Pascal.

Refer: https://github.com/BoschSensortec/BMP3-Sensor-API/blob/master/bmp3.c

Definition at line 523 of file bmp388.cpp.

References bmp3_reg_calib_data::par_p1, bmp3_reg_calib_data::par_p10, bmp3_reg_calib_data::par_p11, bmp3_reg_calib_data::par_p2, bmp3_reg_calib_data::par_p3, bmp3_reg_calib_data::par_p4, bmp3_reg_calib_data::par_p5, bmp3_reg_calib_data::par_p6, bmp3_reg_calib_data::par_p7, bmp3_reg_calib_data::par_p8, bmp3_reg_calib_data::par_p9, bmp3_uncomp_data::pressure, bmp3_calib_data::reg_calib_data, and bmp3_reg_calib_data::t_lin.

Referenced by BMP388::compensate_data().

Here is the caller graph for this function:

◆ compensate_temperature()

static int64_t compensate_temperature ( const struct bmp3_uncomp_data uncomp_data,
struct bmp3_calib_data calib_data 
)
static

This internal API is used to compensate the raw temperature data and return the compensated temperature data in integer data type. For eg if returned temperature is 2426 then it is 2426/100 = 24.26 deg Celsius.

Refer: https://github.com/BoschSensortec/BMP3-Sensor-API/blob/master/bmp3.c

Definition at line 492 of file bmp388.cpp.

References bmp3_reg_calib_data::par_t1, bmp3_reg_calib_data::par_t2, bmp3_reg_calib_data::par_t3, bmp3_calib_data::reg_calib_data, bmp3_reg_calib_data::t_lin, and bmp3_uncomp_data::temperature.

Referenced by BMP388::compensate_data().

Here is the caller graph for this function:

◆ parse_sensor_data()

static void parse_sensor_data ( const uint8_t *  reg_data,
struct bmp3_uncomp_data uncomp_data 
)
static

This internal API is used to parse the pressure or temperature or both the data and store it in the bmp3_uncomp_data structure instance.

Refer: https://github.com/BoschSensortec/BMP3-Sensor-API/blob/master/bmp3.c

Definition at line 467 of file bmp388.cpp.

References bmp3_uncomp_data::pressure, and bmp3_uncomp_data::temperature.

Referenced by BMP388::get_sensor_data().

Here is the caller graph for this function: