Contiki 2.5
|
Files | |
file | pressure-bmp085.h |
Bosch BMP085 Digital Pressure Sensor | |
Data Structures | |
struct | bmp085_calib_data |
Macros | |
#define | BMP085_DEV_ADDR_R 0xEF |
#define | BMP085_DEV_ADDR_W 0xEE |
#define | BMP085_CTRL_REG_ADDR 0xF4 |
#define | BMP085_CTRL_REG_TEMP 0x2E |
#define | BMP085_CTRL_REG_PRESS_0 0x34 |
#define | BMP085_CTRL_REG_PRESS_1 0x74 |
#define | BMP085_CTRL_REG_PRESS_2 0xB4 |
#define | BMP085_CTRL_REG_PRESS_3 0xF4 |
#define | BMP085_DATA_REG_N 0xF6 |
#define | BMP085_DATA_REG_X 0xF8 |
#define | BMP085_AC1_ADDR 0xAA |
#define | BMP085_AC2_ADDR 0xAC |
#define | BMP085_AC3_ADDR 0xAE |
#define | BMP085_AC4_ADDR 0xB0 |
#define | BMP085_AC5_ADDR 0xB2 |
#define | BMP085_AC6_ADDR 0xB4 |
#define | BMP085_B1_ADDR 0xB6 |
#define | BMP085_B2_ADDR 0xB8 |
#define | BMP085_MB_ADDR 0xBA |
#define | BMP085_MC_ADDR 0xBC |
#define | BMP085_MD_ADDR 0xBE |
Functions | |
int8_t | bmp085_init (void) |
Initialize the MPL115A Pressure Sensor. More... | |
int32_t | bmp085_read_temperature (void) |
This functions reads the raw value of one temperature conversion. More... | |
int32_t | bmp085_read_comp_temperature (void) |
This function reads the raw temperature value and converts it to real temerature. More... | |
int32_t | bmp085_read_pressure (uint8_t mode) |
This functions reads the raw value of one pressure conversion. More... | |
int32_t | bmp085_read_comp_pressure (uint8_t mode) |
This functions reads the temperature compensated value of one pressure conversion. More... | |
void | bmp085_read_calib_data (void) |
Reads all coefficients from eeprom. | |
uint16_t | bmp085_read16bit_data (uint8_t addr) |
Generic minor function to read two byte sequentially. More... | |
uint8_t | bmp085_read8bit_data (uint8_t addr) |
Generic minor function to read one byte. More... | |
With an pressure sensor it is possible to measure the activity of a person. Especially the Bosch BMP085 allows the registration of small height fluctuations by sensing the air pressure. In some related papers, a concrete application was implemented, to show how a fall analysis could be done
#define BMP085_AC1_ADDR 0xAA |
Coefficient AC1 eeprom address
Definition at line 100 of file pressure-bmp085.h.
Referenced by bmp085_init(), and bmp085_read_calib_data().
#define BMP085_AC2_ADDR 0xAC |
Coefficient AC2 eeprom address
Definition at line 104 of file pressure-bmp085.h.
Referenced by bmp085_read_calib_data().
#define BMP085_AC3_ADDR 0xAE |
Coefficient AC3 eeprom address
Definition at line 108 of file pressure-bmp085.h.
Referenced by bmp085_read_calib_data().
#define BMP085_AC4_ADDR 0xB0 |
Coefficient AC4 eeprom address
Definition at line 112 of file pressure-bmp085.h.
Referenced by bmp085_read_calib_data().
#define BMP085_AC5_ADDR 0xB2 |
Coefficient AC5 eeprom address
Definition at line 116 of file pressure-bmp085.h.
Referenced by bmp085_read_calib_data().
#define BMP085_AC6_ADDR 0xB4 |
Coefficient AC6 eeprom address
Definition at line 120 of file pressure-bmp085.h.
Referenced by bmp085_read_calib_data().
#define BMP085_B1_ADDR 0xB6 |
Coefficient B1 eeprom address
Definition at line 124 of file pressure-bmp085.h.
Referenced by bmp085_read_calib_data().
#define BMP085_B2_ADDR 0xB8 |
Coefficient B2 eeprom address
Definition at line 128 of file pressure-bmp085.h.
Referenced by bmp085_read_calib_data().
#define BMP085_CTRL_REG_ADDR 0xF4 |
Basic control register address
Definition at line 65 of file pressure-bmp085.h.
Referenced by bmp085_read_pressure(), and bmp085_read_temperature().
#define BMP085_CTRL_REG_PRESS_0 0x34 |
Control register address for oversampling mode 0
Definition at line 73 of file pressure-bmp085.h.
Referenced by bmp085_read_pressure().
#define BMP085_CTRL_REG_PRESS_1 0x74 |
Control register address for oversampling mode 1
Definition at line 77 of file pressure-bmp085.h.
Referenced by bmp085_read_pressure().
#define BMP085_CTRL_REG_PRESS_2 0xB4 |
Control register address for oversampling mode 2
Definition at line 81 of file pressure-bmp085.h.
Referenced by bmp085_read_pressure().
#define BMP085_CTRL_REG_PRESS_3 0xF4 |
Control register address for oversampling mode 3
Definition at line 85 of file pressure-bmp085.h.
Referenced by bmp085_read_pressure().
#define BMP085_CTRL_REG_TEMP 0x2E |
Control register address for temperature
Definition at line 69 of file pressure-bmp085.h.
Referenced by bmp085_read_temperature().
#define BMP085_DATA_REG_N 0xF6 |
Main data register address
Definition at line 90 of file pressure-bmp085.h.
Referenced by bmp085_read_pressure(), and bmp085_read_temperature().
#define BMP085_DATA_REG_X 0xF8 |
Extended data register address for 19bit resolution
Definition at line 95 of file pressure-bmp085.h.
Referenced by bmp085_read_pressure().
#define BMP085_DEV_ADDR_R 0xEF |
I2C address to read data
Definition at line 56 of file pressure-bmp085.h.
Referenced by bmp085_read16bit_data(), and bmp085_read8bit_data().
#define BMP085_DEV_ADDR_W 0xEE |
I2C address to write data
Definition at line 60 of file pressure-bmp085.h.
Referenced by bmp085_read16bit_data(), bmp085_read8bit_data(), bmp085_read_pressure(), and bmp085_read_temperature().
#define BMP085_MB_ADDR 0xBA |
Coefficient MB eeprom address
Definition at line 132 of file pressure-bmp085.h.
Referenced by bmp085_read_calib_data().
#define BMP085_MC_ADDR 0xBC |
Coefficient MC eeprom address
Definition at line 136 of file pressure-bmp085.h.
Referenced by bmp085_read_calib_data().
#define BMP085_MD_ADDR 0xBE |
Coefficient MD eeprom address
Definition at line 140 of file pressure-bmp085.h.
Referenced by bmp085_read_calib_data().
int8_t bmp085_init | ( | void | ) |
Initialize the MPL115A Pressure Sensor.
Definition at line 11 of file pressure-bmp085.c.
References BMP085_AC1_ADDR, bmp085_read16bit_data(), and bmp085_read_calib_data().
uint16_t bmp085_read16bit_data | ( | uint8_t | addr | ) |
Generic minor function to read two byte sequentially.
Definition at line 135 of file pressure-bmp085.c.
References BMP085_DEV_ADDR_R, and BMP085_DEV_ADDR_W.
Referenced by bmp085_init(), bmp085_read_calib_data(), bmp085_read_pressure(), and bmp085_read_temperature().
uint8_t bmp085_read8bit_data | ( | uint8_t | addr | ) |
Generic minor function to read one byte.
Definition at line 146 of file pressure-bmp085.c.
References BMP085_DEV_ADDR_R, and BMP085_DEV_ADDR_W.
Referenced by bmp085_read_pressure().
int32_t bmp085_read_comp_pressure | ( | uint8_t | mode | ) |
This functions reads the temperature compensated value of one pressure conversion.
mode |
|
Definition at line 81 of file pressure-bmp085.c.
References bmp085_read_pressure(), and bmp085_read_temperature().
int32_t bmp085_read_comp_temperature | ( | void | ) |
This function reads the raw temperature value and converts it to real temerature.
return Temerature in 0.1 Degree
Definition at line 65 of file pressure-bmp085.c.
References bmp085_read_temperature().
int32_t bmp085_read_pressure | ( | uint8_t | mode | ) |
This functions reads the raw value of one pressure conversion.
mode |
|
Definition at line 33 of file pressure-bmp085.c.
References BMP085_CTRL_REG_ADDR, BMP085_CTRL_REG_PRESS_0, BMP085_CTRL_REG_PRESS_1, BMP085_CTRL_REG_PRESS_2, BMP085_CTRL_REG_PRESS_3, BMP085_DATA_REG_N, BMP085_DATA_REG_X, BMP085_DEV_ADDR_W, bmp085_read16bit_data(), and bmp085_read8bit_data().
Referenced by bmp085_read_comp_pressure().
int32_t bmp085_read_temperature | ( | void | ) |
This functions reads the raw value of one temperature conversion.
Definition at line 24 of file pressure-bmp085.c.
References BMP085_CTRL_REG_ADDR, BMP085_CTRL_REG_TEMP, BMP085_DATA_REG_N, BMP085_DEV_ADDR_W, and bmp085_read16bit_data().
Referenced by bmp085_read_comp_pressure(), and bmp085_read_comp_temperature().