Paparazzi UAS  v5.15_devel-81-gd13dafb
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
airspeed_ets.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009 Vassilis Varveropoulos
3  * Modified by Mark Griffin on 8 September 2010 to work with new i2c transaction routines.
4  * Converted by Gautier Hattenberger to modules (10/2010)
5  *
6  * This file is part of paparazzi.
7  *
8  * paparazzi is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2, or (at your option)
11  * any later version.
12  *
13  * paparazzi is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with paparazzi; see the file COPYING. If not, write to
20  * the Free Software Foundation, 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
41 #ifndef AIRSPEED_ETS_H
42 #define AIRSPEED_ETS_H
43 
44 #include "std.h"
45 #include "mcu_periph/i2c.h"
46 
49 extern bool airspeed_ets_valid;
50 extern float airspeed_ets;
51 
53 
54 extern void airspeed_ets_init(void);
55 extern void airspeed_ets_read_periodic(void);
56 extern void airspeed_ets_read_event(void);
57 
58 static inline void AirspeedEtsEvent(void)
59 {
63  // if transaction failed, mark as done so can be retried
65  }
66 }
67 
68 #endif // AIRSPEED_ETS_H
unsigned short uint16_t
Definition: types.h:16
void airspeed_ets_init(void)
Definition: airspeed_ets.c:113
uint16_t airspeed_ets_offset
Definition: airspeed_ets.c:97
transaction successfully finished by I2C driver
Definition: i2c.h:57
float airspeed_ets
Definition: airspeed_ets.c:99
struct i2c_transaction airspeed_ets_i2c_trans
Definition: airspeed_ets.c:103
uint16_t airspeed_ets_raw
Definition: airspeed_ets.c:96
void airspeed_ets_read_periodic(void)
Definition: airspeed_ets.c:142
transaction set to done by user level
Definition: i2c.h:59
transaction failed
Definition: i2c.h:58
I2C transaction structure.
Definition: i2c.h:93
enum I2CTransactionStatus status
Transaction status.
Definition: i2c.h:126
bool airspeed_ets_valid
Definition: airspeed_ets.c:98
void airspeed_ets_read_event(void)
Definition: airspeed_ets.c:158
static void AirspeedEtsEvent(void)
Definition: airspeed_ets.h:58
Architecture independent I2C (Inter-Integrated Circuit Bus) API.