Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010 Martin Mueller
3  * Copyright (C) 2013 Felix Ruess <>
4  *
5  * This file is part of paparazzi.
6  *
7  * paparazzi is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2, or (at your option)
10  * any later version.
11  *
12  * paparazzi is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with paparazzi; see the file COPYING. If not, write to
19  * the Free Software Foundation, 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
27 #ifndef BMP085_H
28 #define BMP085_H
30 #include "mcu_periph/i2c.h"
31 #include "std.h"
40 };
42 struct Bmp085Calib {
43  // These values come from EEPROM on sensor
56  // These values are calculated
58 };
60 typedef bool_t (*Bmp085EOC)(void);
62 struct Bmp085 {
63  struct i2c_periph *i2c_p;
67  bool_t initialized;
68  volatile bool_t data_available;
74 };
76 extern void bmp085_read_eeprom_calib(struct Bmp085 *bmp);
77 extern void bmp085_init(struct Bmp085 *bmp, struct i2c_periph *i2c_p, uint8_t addr);
78 extern void bmp085_periodic(struct Bmp085 *bmp);
79 extern void bmp085_event(struct Bmp085 *bmp);
81 #endif
int32_t up
uncompensated pressure
Definition: bmp085.h:71
unsigned short uint16_t
Definition: types.h:16
void bmp085_init(struct Bmp085 *bmp, struct i2c_periph *i2c_p, uint8_t addr)
Definition: bmp085.c:83
int16_t ac1
Definition: bmp085.h:44
Bmp085EOC eoc
function to check End Of Conversion
Definition: bmp085.h:65
int16_t ac3
Definition: bmp085.h:46
int16_t ac2
Definition: bmp085.h:45
int16_t mb
Definition: bmp085.h:52
struct Bmp085Calib calib
Definition: bmp085.h:69
struct i2c_transaction i2c_trans
Definition: bmp085.h:64
enum Bmp085Status status
state machine status
Definition: bmp085.h:66
int16_t b2
Definition: bmp085.h:51
int16_t md
Definition: bmp085.h:54
Definition: bmp085.h:62
int16_t b1
Definition: bmp085.h:50
int32_t b5
Definition: bmp085.h:57
int32_t temperature
temperature in 0.1 deg Celcius
Definition: bmp085.h:72
void bmp085_event(struct Bmp085 *bmp)
Definition: bmp085.c:142
signed short int16_t
Definition: types.h:17
volatile bool_t data_available
data ready flag
Definition: bmp085.h:68
int16_t mc
Definition: bmp085.h:53
I2C transaction structure.
Definition: i2c.h:93
struct i2c_periph * i2c_p
Definition: bmp085.h:63
signed long int32_t
Definition: types.h:19
void bmp085_periodic(struct Bmp085 *bmp)
Start new measurement if idle or read temp/pressure.
Definition: bmp085.c:108
I2C peripheral structure.
Definition: i2c.h:138
int32_t pressure
pressure in Pascal
Definition: bmp085.h:73
unsigned char uint8_t
Definition: types.h:14
uint16_t ac5
Definition: bmp085.h:48
bool_t(* Bmp085EOC)(void)
Definition: bmp085.h:60
uint16_t ac6
Definition: bmp085.h:49
int32_t ut
uncompensated temperature
Definition: bmp085.h:70
Definition: bmp085.h:33
uint16_t ac4
Definition: bmp085.h:47
void bmp085_read_eeprom_calib(struct Bmp085 *bmp)
Definition: bmp085.c:73
bool_t initialized
config done flag
Definition: bmp085.h:67
Architecture independent I2C (Inter-Integrated Circuit Bus) API.