Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
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
float airspeed_ets
Definition: airspeed_ets.c:105
uint16_t airspeed_ets_raw
Definition: airspeed_ets.c:102
void airspeed_ets_read_event(void)
Definition: airspeed_ets.c:184
bool airspeed_ets_valid
Definition: airspeed_ets.c:104
static void AirspeedEtsEvent(void)
Definition: airspeed_ets.h:58
uint16_t airspeed_ets_offset
Definition: airspeed_ets.c:103
void airspeed_ets_init(void)
Definition: airspeed_ets.c:134
void airspeed_ets_read_periodic(void)
Definition: airspeed_ets.c:168
struct i2c_transaction airspeed_ets_i2c_trans
Definition: airspeed_ets.c:109
enum I2CTransactionStatus status
Transaction status.
Definition: i2c.h:126
@ I2CTransSuccess
transaction successfully finished by I2C driver
Definition: i2c.h:57
@ I2CTransFailed
transaction failed
Definition: i2c.h:58
@ I2CTransDone
transaction set to done by user level
Definition: i2c.h:59
I2C transaction structure.
Definition: i2c.h:93
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
Definition: vl53l1_types.h:88