ChibiOS/EX 1.3.0
bmp085.c File Reference

BMP085 Digital pressure sensor interface module code. More...

#include "hal.h"
#include "bmp085.h"

Go to the source code of this file.

Macros

#define BMP085_SAD   0x77
#define BMP085_CR_P_VAL0   0x34
#define BMP085_CR_P_VAL1   0x74
#define BMP085_CR_P_VAL2   0xB4
#define BMP085_CR_P_VAL3   0xF4
#define BMP085_CR_T_VAL   0x2E

Functions

msg_t bmp085I2CReadRegister (I2CDriver *i2cp, uint8_t reg, uint8_t *rxbufp, size_t n)
 Reads registers value using I2C.
msg_t bmp085I2CWriteRegister (I2CDriver *i2cp, uint8_t *txbufp, size_t n)
 Writes a value into a register using I2C.
static msg_t bmp085ReadCoefficient (BMP085Driver *devp, uint8_t reg)
 Read all the calibration data from the BMP085 EEPROM.
static void calcul_t (BMP085Driver *devp, int32_t ut, float *ctp)
 Calcul the true temperature.
static void calcul_p (BMP085Driver *devp, int32_t up, uint8_t oss, float *cpp)
 Calcul the true pressure.
static msg_t start_t_measurement (BMP085Driver *devp)
 Start temperature measurement.
static msg_t start_p_measurement (BMP085Driver *devp)
 Start the pressure measurment.
static msg_t acquire_ut (BMP085Driver *devp, int32_t *utemp)
 Read the uncompensated temperature from the BMP085 register.
static msg_t acquire_up (BMP085Driver *devp, int32_t *upress)
 Read the uncompensated pressure from the BMP085 register.
static size_t baro_get_axes_number (void *ip)
 Get the barometer number of axes.
static size_t thermo_get_axes_number (void *ip)
 Get the thermometer number of axes.
static size_t sens_get_axes_number (void *ip)
 Get the sensor number of axes.
static msg_t baro_read_raw (void *ip, int32_t axes[])
 Read baromether raw data.
static msg_t thermo_read_raw (void *ip, int32_t axes[])
 Read thermometer raw data.
static msg_t sens_read_raw (void *ip, int32_t axes[])
 Read BMP085 sensor raw data.
static msg_t baro_read_cooked (void *ip, float axes[])
 Read barometer cooked data.
static msg_t thermo_read_cooked (void *ip, float axes[])
 Read thermometer cooked data.
static msg_t sens_read_cooked (void *ip, float axes[])
 Read BMP085 sensor cooked data.
static msg_t baro_set_bias (void *ip, float *bp)
 Set the barometer bias.
static msg_t thermo_set_bias (void *ip, float *bp)
 Set the thermometer bias.
static msg_t baro_reset_bias (void *ip)
 Reset the barometer bias.
static msg_t thermo_reset_bias (void *ip)
 Reset the thermometer bias.
static msg_t baro_set_sensivity (void *ip, float *sp)
 Set the barometer sensivity.
static msg_t thermo_set_sensivity (void *ip, float *sp)
 Set the thermometer sensivity.
static msg_t baro_reset_sensivity (void *ip)
 Reset the barometer sensivity.
static msg_t thermo_reset_sensivity (void *ip)
 Reset the thermometer sensivity.
void bmp085ObjectInit (BMP085Driver *devp)
 Initializes an instance.
void bmp085Start (BMP085Driver *devp, const BMP085Config *config)
 Configures and activates BMP085 Complex Driver peripheral.
void bmp085Stop (BMP085Driver *devp)
 Deactivates the BMP085 Complex Driver peripheral.

Variables

static const struct BaseSensorVMT vmt_basesensor
static const struct BaseBarometerVMT vmt_basebarometer
static const struct BaseThermometerVMT vmt_basethermometer

Detailed Description

BMP085 Digital pressure sensor interface module code.

Definition in file bmp085.c.