Paparazzi UAS  v4.2.2_stable-4-gcc32f65
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
airspeed_ets.h
Go to the documentation of this file.
1 /*
2  * Driver for the EagleTree Systems Airspeed Sensor
3  * Has only been tested with V3 of the sensor hardware
4  *
5  * Notes:
6  * Connect directly to TWOG/Tiny I2C port. Multiple sensors can be chained together.
7  * Sensor should be in the proprietary mode (default) and not in 3rd party mode.
8  *
9  * Sensor module wire assignments:
10  * Red wire: 5V
11  * White wire: Ground
12  * Yellow wire: SDA
13  * Brown wire: SCL
14  *
15  * Copyright (C) 2009 Vassilis Varveropoulos
16  * Modified by Mark Griffin on 8 September 2010 to work with new i2c transaction routines.
17  * Converted by Gautier Hattenberger to modules (10/2010)
18  *
19  * This file is part of paparazzi.
20  *
21  * paparazzi is free software; you can redistribute it and/or modify
22  * it under the terms of the GNU General Public License as published by
23  * the Free Software Foundation; either version 2, or (at your option)
24  * any later version.
25  *
26  * paparazzi is distributed in the hope that it will be useful,
27  * but WITHOUT ANY WARRANTY; without even the implied warranty of
28  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29  * GNU General Public License for more details.
30  *
31  * You should have received a copy of the GNU General Public License
32  * along with paparazzi; see the file COPYING. If not, write to
33  * the Free Software Foundation, 59 Temple Place - Suite 330,
34  * Boston, MA 02111-1307, USA.
35  *
36  */
37 
38 #ifndef AIRSPEED_ETS_H
39 #define AIRSPEED_ETS_H
40 
41 #include "std.h"
42 #include "mcu_periph/i2c.h"
43 
46 extern bool_t airspeed_ets_valid;
47 extern float airspeed_ets;
48 
50 
51 extern void airspeed_ets_init( void );
52 extern void airspeed_ets_read_periodic( void );
53 extern void airspeed_ets_read_event( void );
54 
55 #define AirspeedEtsEvent() { if (airspeed_ets_i2c_trans.status == I2CTransSuccess) airspeed_ets_read_event(); }
56 
57 #endif // AIRSPEED_ETS_H
unsigned short uint16_t
Definition: types.h:16
void airspeed_ets_init(void)
Definition: airspeed_ets.c:88
uint16_t airspeed_ets_offset
Definition: airspeed_ets.c:74
float airspeed_ets
Definition: airspeed_ets.c:76
struct i2c_transaction airspeed_ets_i2c_trans
Definition: airspeed_ets.c:80
uint16_t airspeed_ets_raw
Definition: airspeed_ets.c:73
void airspeed_ets_read_periodic(void)
Definition: airspeed_ets.c:106
void airspeed_ets_read_event(void)
Definition: airspeed_ets.c:116
bool_t airspeed_ets_valid
Definition: airspeed_ets.c:75