Paparazzi UAS  v5.15_devel-99-g2ff7410
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
baro_board.h
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2010-2013 Antoine Drouin, Gautier Hattenberger
3 *
4 * This file is part of paparazzi.
5 *
6 * paparazzi is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * paparazzi is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with paparazzi; see the file COPYING. If not, write to
18 * the Free Software Foundation, 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 *
21 */
22 
28 #ifndef BOARDS_BOOZ_BARO_H
29 #define BOARDS_BOOZ_BARO_H
30 
31 #include "std.h"
32 
34 #include "mcu_periph/adc.h"
35 #include "mcu_periph/dac.h"
36 
40 };
41 
42 struct BaroBoard {
47  struct adc_buf buf;
48 };
49 
50 extern struct BaroBoard baro_board;
51 
52 extern void baro_board_calibrate(void);
53 #define BaroEvent() {}
54 
55 static inline void baro_board_SetOffset(uint16_t _o)
56 {
57  baro_board.offset = _o;
58  DACSet(_o);
59 }
60 
61 
62 #endif /* BOARDS_BOOZ_BARO_H */
unsigned short uint16_t
Definition: types.h:16
void baro_board_calibrate(void)
Definition: baro_board.c:95
Common barometric sensor implementation.
struct adc_buf buf
Definition: baro_board.h:47
uint16_t value_filtered
Definition: baro_board.h:46
arch independent ADC (Analog to Digital Converter) API
static void baro_board_SetOffset(uint16_t _o)
Definition: baro_board.h:55
uint16_t offset
Definition: baro_board.h:45
struct BaroBoard baro_board
Definition: baro_board.c:63
Generic interface for all ADC hardware drivers, independent from microcontroller architecture.
Definition: adc.h:53
BaroBoardStatus
Definition: baro_board.h:37
int32_t absolute
Definition: baro_board.h:44
enum BaroBoardStatus status
Definition: baro_board.h:43
signed long int32_t
Definition: types.h:19
static void DACSet(uint16_t x)
Definition: dac_arch.h:36