Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
bmp3_i2c.c File Reference

Sensor driver for BMP3 sensor via I2C. More...

+ Include dependency graph for bmp3_i2c.c:

Go to the source code of this file.

Functions

static void parse_sensor_data (struct Bmp3_I2c *bmp)
 local function to extract raw data from i2c buffer and compute compensation with selected precision
 
static void parse_calib_data (struct Bmp3_I2c *bmp)
 This internal API is used to parse the calibration data, compensates it and store it in device structure.
 
static double compensate_pressure (struct Bmp3_I2c *bmp)
 This internal API is used to compensate the raw pressure data and return the compensated pressure data in double data type.
 
static double compensate_temperature (struct Bmp3_I2c *bmp)
 This internal API is used to compensate the raw temperature data and return the compensated temperature data in double data type.
 
static double bmp3_pow (double base, uint8_t power)
 This internal API is used to calculate the power functionality for double precision floating point values.
 
void bmp3_i2c_init (struct Bmp3_I2c *bmp, struct i2c_periph *i2c_p, uint8_t addr)
 init function
 
void bmp3_i2c_periodic (struct Bmp3_I2c *bmp)
 Start new measurement if sensor ready.
 
void bmp3_i2c_event (struct Bmp3_I2c *bmp)
 

Detailed Description

Sensor driver for BMP3 sensor via I2C.

Modified for Paparazzi from SDP3 driver from BoshSensortec see https://github.com/BoschSensortec/BMP3-Sensor-API for original code and license

Definition in file bmp3_i2c.c.

Function Documentation

◆ bmp3_i2c_event()

void bmp3_i2c_event ( struct Bmp3_I2c *  bmp)

Definition at line 125 of file bmp3_i2c.c.

References BMP3_ALL, BMP3_STATUS_CONFIGURE, BMP3_STATUS_GET_CALIB, BMP3_STATUS_READ_DATA, BMP3_STATUS_UNINIT, compensate_pressure(), compensate_temperature(), foo, I2CTransDone, I2CTransFailed, I2CTransSuccess, parse_calib_data(), and parse_sensor_data().

Referenced by baro_bmp3_event().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bmp3_i2c_init()

void bmp3_i2c_init ( struct Bmp3_I2c *  bmp,
struct i2c_periph *  i2c_p,
uint8_t  addr 
)

init function

Definition at line 60 of file bmp3_i2c.c.

References BMP3_STATUS_UNINIT, foo, I2CTransDone, and i2c_periph::status.

Referenced by baro_bmp3_init().

+ Here is the caller graph for this function:

◆ bmp3_i2c_periodic()

◆ bmp3_pow()

static double bmp3_pow ( double  base,
uint8_t  power 
)
static

This internal API is used to calculate the power functionality for double precision floating point values.

Definition at line 320 of file bmp3_i2c.c.

References foo.

Referenced by compensate_pressure().

+ Here is the caller graph for this function:

◆ compensate_pressure()

static double compensate_pressure ( struct Bmp3_I2c *  bmp)
static

This internal API is used to compensate the raw pressure data and return the compensated pressure data in double data type.

Definition at line 281 of file bmp3_i2c.c.

References bmp3_pow(), and foo.

Referenced by bmp3_i2c_event().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compensate_temperature()

static double compensate_temperature ( struct Bmp3_I2c *  bmp)
static

This internal API is used to compensate the raw temperature data and return the compensated temperature data in double data type.

Definition at line 261 of file bmp3_i2c.c.

References foo.

Referenced by bmp3_i2c_event().

+ Here is the caller graph for this function:

◆ parse_calib_data()

static void parse_calib_data ( struct Bmp3_I2c *  bmp)
static

This internal API is used to parse the calibration data, compensates it and store it in device structure.

Definition at line 193 of file bmp3_i2c.c.

References BMP3_CONCAT_BYTES, and foo.

Referenced by bmp3_i2c_event().

+ Here is the caller graph for this function:

◆ parse_sensor_data()

static void parse_sensor_data ( struct Bmp3_I2c *  bmp)
static

local function to extract raw data from i2c buffer and compute compensation with selected precision

Definition at line 166 of file bmp3_i2c.c.

References foo.

Referenced by bmp3_i2c_event().

+ Here is the caller graph for this function: