Paparazzi UAS  v4.2.2_stable-4-gcc32f65
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
adc_arch.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  *
4  * Copyright (C) 2010 Paparazzi team
5  *
6  * This file is part of Paparazzi.
7  *
8  * Paparazzi is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2, or (at your option)
11  * any later version.
12  *
13  * Paparazzi is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with Paparazzi; see the file COPYING. If not, write to
20  * the Free Software Foundation, 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  *
23  */
24 
25 #ifndef ADC_HW_H
26 #define ADC_HW_H
27 
28 /*
29  * Architecture dependant ADC functions for STM32
30  * For now only hard coded for Lisa/L
31  *
32  * Logic STM32
33  * ADC1 PC3 ADC13
34  * ADC2 PC5 ADC15
35  * ADC3 PB0 ADC8
36  * ADC4 PB1 ADC9
37  * ADC5 PB2 BOOT1
38  * PA0 ADC0 bat monitor
39  */
40 
41 // NB_ADCx_CHANNELS
42 // {{{
44 #ifdef USE_AD1_1
45  ADC1_C1,
46 #endif
47 #ifdef USE_AD1_2
48  ADC1_C2,
49 #endif
50 #ifdef USE_AD1_3
51  ADC1_C3,
52 #endif
53 #ifdef USE_AD1_4
54  ADC1_C4,
55 #endif
57 };
58 
60 #ifdef USE_AD2_1
61  ADC2_C1,
62 #endif
63 #ifdef USE_AD2_2
64  ADC2_C2,
65 #endif
66 #ifdef USE_AD2_3
67  ADC2_C3,
68 #endif
69 #ifdef USE_AD2_4
70  ADC2_C4,
71 #endif
73 };
74 
75 #ifdef NB_ADC
76 #undef NB_ADC
77 #endif
78 
79 #define NB_ADC (NB_ADC1_CHANNELS + NB_ADC2_CHANNELS)
80 
81 // }}}
82 
83 #define AdcBank0(x) (x)
84 #define AdcBank1(x) (x+NB_ADC)
85 
86 #endif /* ADC_HW_H */
adc1_channels
Definition: adc_arch.h:43
adc2_channels
Definition: adc_arch.h:59