Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures 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 
52 #ifdef AD2_1_CHANNEL
53  AD2_1 = ADC1_END,
54 #endif
55 #ifdef AD2_2_CHANNEL
56  AD2_2,
57 #endif
58 #ifdef AD2_3_CHANNEL
59  AD2_3,
60 #endif
61 #ifdef AD2_4_CHANNEL
62  AD2_4,
63 #endif
65 };
66 
68 #ifdef AD3_1_CHANNEL
69  AD3_1 = ADC2_END,
70 #endif
71 #ifdef AD3_2_CHANNEL
72  AD3_2,
73 #endif
74 #ifdef AD3_3_CHANNEL
75  AD3_3,
76 #endif
77 #ifdef AD3_4_CHANNEL
78  AD3_4,
79 #endif
81 };
82 
83 #if USE_ADC_WATCHDOG
84 
85 /* Watchdog callback type definition
86  */
87 typedef void (*adc_watchdog_callback)(void);
88 
89 /* Watchdog register function
90  *
91  * @param adc adc bank to monitor
92  * @param chan adc channel to monitor
93  * @param low low threshhold for callback trigger
94  * @param high high threshhold for callback trigger
95  */
96 extern void register_adc_watchdog(uint32_t adc, uint8_t chan, uint16_t low, uint16_t high, adc_watchdog_callback cb);
97 
98 #endif
99 
100 #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:67
adc2_channels
Definition: adc_arch.h:51