Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
baro_ets.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009 Vassilis Varveropoulos
3  * Copyright (C) 2010 The Paparazzi Team
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
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
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  */
22 
42 #ifndef BARO_ETS_H
43 #define BARO_ETS_H
44 
45 #include "std.h"
46 #include "mcu_periph/i2c.h"
47 
49 #define BARO_ETS_DT BARO_ETS_READ_PERIODIC_PERIOD
50 
51 extern uint16_t baro_ets_adc;
53 extern bool baro_ets_valid;
54 extern bool baro_ets_enabled;
55 extern float baro_ets_altitude;
56 extern float baro_ets_r;
57 extern float baro_ets_sigma2;
58 
60 
61 extern void baro_ets_init(void);
62 extern void baro_ets_read_periodic(void);
63 extern void baro_ets_read_event(void);
64 
65 #define BaroEtsEvent() { if (baro_ets_i2c_trans.status == I2CTransSuccess) baro_ets_read_event(); }
66 
67 #endif // BARO_ETS_H
bool baro_ets_enabled
Definition: baro_ets.c:107
unsigned short uint16_t
Definition: types.h:16
float baro_ets_sigma2
Definition: baro_ets.c:109
void baro_ets_init(void)
Definition: baro_ets.c:120
void baro_ets_read_event(void)
Definition: baro_ets.c:151
bool baro_ets_valid
Definition: baro_ets.c:105
float baro_ets_altitude
Definition: baro_ets.c:106
void baro_ets_read_periodic(void)
Definition: baro_ets.c:139
uint16_t baro_ets_adc
Definition: baro_ets.c:103
I2C transaction structure.
Definition: i2c.h:93
struct i2c_transaction baro_ets_i2c_trans
Definition: baro_ets.c:111
float baro_ets_r
Definition: baro_ets.c:108
uint16_t baro_ets_offset
Definition: baro_ets.c:104
Architecture independent I2C (Inter-Integrated Circuit Bus) API.