Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
baro_amsys.h
Go to the documentation of this file.
1/*
2 * Driver for a Amsys Barometric Sensor I2C
3 * AMS 5812-0150-A
4 *
5 * Copyright (C) 2010 The Paparazzi Team
6 *
7 * This file is part of paparazzi.
8 *
9 * paparazzi is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2, or (at your option)
12 * any later version.
13 *
14 * paparazzi is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with paparazzi; see the file COPYING. If not, write to
21 * the Free Software Foundation, 59 Temple Place - Suite 330,
22 * Boston, MA 02111-1307, USA.
23 */
24
25#ifndef BARO_AMSYS_H
26#define BARO_AMSYS_H
27
28#include "std.h"
29#include "mcu_periph/i2c.h"
30
32#define BARO_AMSYS_DT BARO_AMSYS_READ_PERIODIC_PERIOD
33
35// extern float baro_amsys_offset;
36extern bool baro_amsys_valid;
37extern bool baro_amsys_enabled;
38extern float baro_amsys_altitude;
39extern float baro_amsys_r;
40extern float baro_amsys_sigma2;
41extern float baro_filter;
42
44
45extern void baro_amsys_init(void);
46extern void baro_amsys_read_periodic(void);
47extern void baro_amsys_read_event(void);
48
49#define BaroAmsysEvent() { if (baro_amsys_i2c_trans.status == I2CTransSuccess) baro_amsys_read_event(); }
50
51#endif // BARO_AMSYS_H
void baro_amsys_read_event(void)
Definition baro_amsys.c:138
void baro_amsys_init(void)
Definition baro_amsys.c:97
void baro_amsys_read_periodic(void)
Definition baro_amsys.c:118
float baro_amsys_r
Definition baro_amsys.c:78
float baro_amsys_altitude
Definition baro_amsys.c:76
bool baro_amsys_valid
Definition baro_amsys.c:75
float baro_amsys_sigma2
Definition baro_amsys.c:79
bool baro_amsys_enabled
Definition baro_amsys.c:77
float baro_filter
Definition baro_amsys.c:86
uint16_t baro_amsys_adc
Definition baro_amsys.c:73
struct i2c_transaction baro_amsys_i2c_trans
Definition baro_amsys.c:90
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.