Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
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 */
uint16_t
unsigned short uint16_t
Definition: types.h:16
baro_board
struct BaroBoard baro_board
Definition: baro_board.c:63
DACSet
static void DACSet(uint16_t x)
Definition: dac_arch.h:36
BaroBoard::buf
struct adc_buf buf
Definition: baro_board.h:47
BaroBoardStatus
BaroBoardStatus
Definition: baro_board.h:37
adc.h
arch independent ADC (Analog to Digital Converter) API
BB_UNINITIALIZED
@ BB_UNINITIALIZED
Definition: baro_board.h:38
BaroBoard
Definition: baro_board.h:42
std.h
BaroBoard::offset
uint16_t offset
Definition: baro_board.h:45
BaroBoard::status
enum BaroBoardStatus status
Definition: baro_board.h:43
dac.h
baro.h
baro_board_calibrate
void baro_board_calibrate(void)
Definition: baro_board.c:95
BaroBoard::value_filtered
uint16_t value_filtered
Definition: baro_board.h:46
int32_t
signed long int32_t
Definition: types.h:19
baro_board_SetOffset
static void baro_board_SetOffset(uint16_t _o)
Definition: baro_board.h:55
BB_RUNNING
@ BB_RUNNING
Definition: baro_board.h:39
BaroBoard::absolute
int32_t absolute
Definition: baro_board.h:44
adc_buf
Generic interface for all ADC hardware drivers, independent from microcontroller architecture.
Definition: adc.h:53