Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
bmp085.c File Reference

Bosch BMP085 driver interface. More...

+ Include dependency graph for bmp085.c:

Go to the source code of this file.

Functions

static int32_t bmp085_compensated_temperature (struct Bmp085Calib *calib, int32_t raw)
 
static int32_t bmp085_compensated_pressure (struct Bmp085Calib *calib, int32_t raw)
 Apply temp calibration and sensor calibration to raw measurement to get Pa (from BMP085 datasheet) More...
 
static bool bmp085_eoc_true (void)
 Dummy function to always return TRUE on EndOfConversion check. More...
 
void bmp085_read_eeprom_calib (struct Bmp085 *bmp)
 
void bmp085_init (struct Bmp085 *bmp, struct i2c_periph *i2c_p, uint8_t addr)
 
void bmp085_periodic (struct Bmp085 *bmp)
 Start new measurement if idle or read temp/pressure. More...
 
void bmp085_event (struct Bmp085 *bmp)
 

Detailed Description

Bosch BMP085 driver interface.

Definition in file bmp085.c.

Function Documentation

◆ bmp085_compensated_pressure()

static int32_t bmp085_compensated_pressure ( struct Bmp085Calib calib,
int32_t  raw 
)
static

Apply temp calibration and sensor calibration to raw measurement to get Pa (from BMP085 datasheet)

Definition at line 44 of file bmp085.c.

References Bmp085Calib::ac1, Bmp085Calib::ac2, Bmp085Calib::ac3, Bmp085Calib::ac4, Bmp085Calib::b1, Bmp085Calib::b2, Bmp085Calib::b5, BMP085_OSS, and p.

Referenced by bmp085_event().

+ Here is the caller graph for this function:

◆ bmp085_compensated_temperature()

static int32_t bmp085_compensated_temperature ( struct Bmp085Calib calib,
int32_t  raw 
)
static

Definition at line 31 of file bmp085.c.

References Bmp085Calib::ac5, Bmp085Calib::ac6, Bmp085Calib::b5, Bmp085Calib::mc, and Bmp085Calib::md.

Referenced by bmp085_event().

+ Here is the caller graph for this function:

◆ bmp085_eoc_true()

static bool bmp085_eoc_true ( void  )
static

Dummy function to always return TRUE on EndOfConversion check.

Ensure proper timing trough frequency of bmp085_periodic instead!

Definition at line 67 of file bmp085.c.

Referenced by bmp085_init().

+ Here is the caller graph for this function:

◆ bmp085_event()

◆ bmp085_init()

void bmp085_init ( struct Bmp085 bmp,
struct i2c_periph i2c_p,
uint8_t  addr 
)

Definition at line 83 of file bmp085.c.

References bmp085_eoc_true(), BMP085_STATUS_UNINIT, Bmp085::data_available, Bmp085::eoc, Bmp085::i2c_p, Bmp085::i2c_trans, I2CTransDone, Bmp085::initialized, i2c_transaction::slave_addr, i2c_transaction::status, and Bmp085::status.

Referenced by baro_bmp_init(), and baro_init().

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

◆ bmp085_periodic()

void bmp085_periodic ( struct Bmp085 bmp)

Start new measurement if idle or read temp/pressure.

Should run at < 40Hz unless eoc check function is provided. At ultra high resolution (oss = 3) conversion time is max 25.5ms.

Definition at line 108 of file bmp085.c.

References BMP085_CTRL_REG, BMP085_DAT_MSB, BMP085_START_TEMP, BMP085_STATUS_IDLE, BMP085_STATUS_READ_PRESS, BMP085_STATUS_READ_TEMP, BMP085_STATUS_START_PRESS, BMP085_STATUS_START_TEMP, i2c_transaction::buf, Bmp085::eoc, Bmp085::i2c_p, Bmp085::i2c_trans, i2c_transceive(), i2c_transmit(), i2c_transaction::slave_addr, and Bmp085::status.

Referenced by baro_bmp_periodic(), and baro_periodic().

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

◆ bmp085_read_eeprom_calib()

void bmp085_read_eeprom_calib ( struct Bmp085 bmp)

Definition at line 73 of file bmp085.c.

References BMP085_EEPROM_AC1, BMP085_STATUS_UNINIT, i2c_transaction::buf, Bmp085::i2c_p, Bmp085::i2c_trans, i2c_transceive(), I2CTransDone, Bmp085::initialized, i2c_transaction::slave_addr, i2c_transaction::status, and Bmp085::status.

Referenced by baro_bmp_periodic(), and baro_periodic().

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