|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
36 return (calib->
b5 + 8) >> 4;
47 int32_t x1 = (calib->
b2 * (b6 * b6 >> 12)) >> 11;
51 x1 = calib->
ac3 * b6 >> 13;
52 x2 = (calib->
b1 * (b6 * b6 >> 12)) >> 16;
53 x3 = ((x1 + x2) + 2) >> 2;
56 int32_t p = b7 < 0x80000000 ? (b7 * 2) / b4 : (b7 / b4) * 2;
57 x1 = (
p >> 8) * (
p >> 8);
58 x1 = (x1 * 3038) >> 16;
59 x2 = (-7357 *
p) >> 16;
60 return p + ((x1 + x2 + 3791) >> 4);
@ BMP085_STATUS_READ_PRESS
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
static bool bmp085_eoc_true(void)
Dummy function to always return TRUE on EndOfConversion check.
void bmp085_periodic(struct Bmp085 *bmp)
Start new measurement if idle or read temp/pressure.
enum Bmp085Status status
state machine status
int32_t temperature
temperature in 0.1 deg Celcius
@ I2CTransFailed
transaction failed
struct i2c_transaction i2c_trans
#define BMP085_EEPROM_AC1
void bmp085_init(struct Bmp085 *bmp, struct i2c_periph *i2c_p, uint8_t addr)
@ I2CTransSuccess
transaction successfully finished by I2C driver
bool i2c_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction.
int32_t ut
uncompensated temperature
#define BMP085_OSS
Over sample setting (0-3)
Bmp085EOC eoc
function to check End Of Conversion
bool initialized
config done flag
bool i2c_transceive(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len_w, uint16_t len_r)
Submit a write/read transaction.
enum I2CTransactionStatus status
Transaction status.
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)
void bmp085_read_eeprom_calib(struct Bmp085 *bmp)
uint8_t slave_addr
Slave address.
struct i2c_periph * i2c_p
@ BMP085_STATUS_START_PRESS
int32_t up
uncompensated pressure
int32_t pressure
pressure in Pascal
volatile bool data_available
data ready flag
@ BMP085_STATUS_READ_TEMP
static int32_t bmp085_compensated_temperature(struct Bmp085Calib *calib, int32_t raw)
#define BMP085_START_TEMP
@ I2CTransDone
transaction set to done by user level
void bmp085_event(struct Bmp085 *bmp)
@ BMP085_STATUS_START_TEMP