Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
adc_arch.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010-2012 Paparazzi team
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 
30 #ifndef ADC_ARCH_H
31 #define ADC_ARCH_H
32 
33 #include BOARD_CONFIG
34 
36 #ifdef AD1_1_CHANNEL
37  AD1_1,
38 #endif
39 #ifdef AD1_2_CHANNEL
40  AD1_2,
41 #endif
42 #ifdef AD1_3_CHANNEL
43  AD1_3,
44 #endif
45 #ifdef AD1_4_CHANNEL
46  AD1_4,
47 #endif
49 };
50 
53 #ifdef AD2_1_CHANNEL
54  AD2_1,
55 #endif
56 #ifdef AD2_2_CHANNEL
57  AD2_2,
58 #endif
59 #ifdef AD2_3_CHANNEL
60  AD2_3,
61 #endif
62 #ifdef AD2_4_CHANNEL
63  AD2_4,
64 #endif
66 };
67 
70 #ifdef AD3_1_CHANNEL
71  AD3_1,
72 #endif
73 #ifdef AD3_2_CHANNEL
74  AD3_2,
75 #endif
76 #ifdef AD3_3_CHANNEL
77  AD3_3,
78 #endif
79 #ifdef AD3_4_CHANNEL
80  AD3_4,
81 #endif
83 };
84 
85 #if USE_ADC_WATCHDOG
86 
87 /* Watchdog callback type definition
88  */
89 typedef void (*adc_watchdog_callback)(void);
90 
91 /* Watchdog register function
92  *
93  * @param adc adc bank to monitor
94  * @param chan adc channel to monitor
95  * @param low low threshhold for callback trigger
96  * @param high high threshhold for callback trigger
97  */
98 extern void register_adc_watchdog(uint32_t adc, uint8_t chan, uint16_t low, uint16_t high, adc_watchdog_callback cb);
99 
100 #endif
101 
102 #endif /* ADC_ARCH_H */
unsigned short uint16_t
Definition: types.h:16
adc1_channels
Definition: adc_arch.h:35
unsigned long uint32_t
Definition: types.h:18
unsigned char uint8_t
Definition: types.h:14
adc3_channels
Definition: adc_arch.h:68
adc2_channels
Definition: adc_arch.h:51