Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
airspeed_amsys.h
Go to the documentation of this file.
1 /*
2  * Driver for a Amsys Differential Presure Sensor I2C
3  * AMS 5812-0003-D
4  * AMS 5812-0001-D
5  *
6  * Copyright (C) 2010 The Paparazzi Team
7  *
8  * This file is part of paparazzi.
9  *
10  * paparazzi is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2, or (at your option)
13  * any later version.
14  *
15  * paparazzi is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with paparazzi; see the file COPYING. If not, write to
22  * the Free Software Foundation, 59 Temple Place - Suite 330,
23  * Boston, MA 02111-1307, USA.
24  */
25 
26 #ifndef AIRSPEED_AMSYS_H
27 #define AIRSPEED_AMSYS_H
28 
29 #include "std.h"
30 #include "mcu_periph/i2c.h"
31 
32 extern float airspeed_scale;
33 extern float airspeed_filter;
34 
36 
37 extern void airspeed_amsys_init(void);
38 extern void airspeed_amsys_read_periodic(void);
39 extern void airspeed_amsys_read_event(void);
40 
41 #define AirspeedAmsysEvent() { if (airspeed_amsys_i2c_trans.status == I2CTransSuccess) airspeed_amsys_read_event(); }
42 
43 #endif // AIRSPEED_AMSYS_H
void airspeed_amsys_init(void)
struct i2c_transaction airspeed_amsys_i2c_trans
float airspeed_scale
float airspeed_filter
void airspeed_amsys_read_event(void)
void airspeed_amsys_read_periodic(void)
I2C transaction structure.
Definition: i2c.h:93
Architecture independent I2C (Inter-Integrated Circuit Bus) API.