6 #define BMP085_I2C_ADDRESS 0x77
8 #define BMP085_CALIBRATION_DATA_START 0xAA
9 #define BMP085_CALIBRATION_DATA_LENGTH 22
11 #define BMP085_CHIP_ID_REG 0xD0
12 #define BMP085_VERSION_REG 0xD1
14 #define BMP085_CHIP_ID 0x55 /* 85 */
18 typedef u_int16_t u16;
23 struct bmp085_calibration_data {
31 /* Each client has this additional data */
34 unsigned char version;
35 struct bmp085_calibration_data calibration;
36 unsigned long raw_temperature;
37 unsigned long raw_pressure;
38 unsigned char oversampling_setting;
39 unsigned long next_temp_measurement;
40 long b6; // calculated temperature correction coefficient
43 int open_bmp085(int adapter_nr, struct bmp085_data *data);
44 void close_bmp085(struct bmp085_data *data);
45 void set_oversampling(struct bmp085_data *data, unsigned char oversampling);
46 unsigned char get_oversampling(struct bmp085_data *data);
47 s32 get_temperature(struct bmp085_data *data);
48 s32 get_pressure(struct bmp085_data *data);