Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
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
35
/* Set the correct ADC resolution */
36
#ifndef ADC_RESOLUTION
37
#define ADC_RESOLUTION 4096
38
#endif
39
40
enum
adc1_channels
{
41
#ifdef AD1_1_CHANNEL
42
AD1_1,
43
#endif
44
#ifdef AD1_2_CHANNEL
45
AD1_2,
46
#endif
47
#ifdef AD1_3_CHANNEL
48
AD1_3,
49
#endif
50
#ifdef AD1_4_CHANNEL
51
AD1_4,
52
#endif
53
ADC1_END
54
};
55
56
enum
adc2_channels
{
57
ADC2_BEGIN
=
ADC1_END
-1,
58
#ifdef AD2_1_CHANNEL
59
AD2_1,
60
#endif
61
#ifdef AD2_2_CHANNEL
62
AD2_2,
63
#endif
64
#ifdef AD2_3_CHANNEL
65
AD2_3,
66
#endif
67
#ifdef AD2_4_CHANNEL
68
AD2_4,
69
#endif
70
ADC2_END
71
};
72
73
enum
adc3_channels
{
74
ADC3_BEGIN
=
ADC2_END
-1,
75
#ifdef AD3_1_CHANNEL
76
AD3_1,
77
#endif
78
#ifdef AD3_2_CHANNEL
79
AD3_2,
80
#endif
81
#ifdef AD3_3_CHANNEL
82
AD3_3,
83
#endif
84
#ifdef AD3_4_CHANNEL
85
AD3_4,
86
#endif
87
ADC3_END
88
};
89
90
#if USE_ADC_WATCHDOG
91
92
/* Watchdog callback type definition
93
*/
94
typedef
void (*adc_watchdog_callback)(void);
95
96
/* Watchdog register function
97
*
98
* @param adc adc bank to monitor
99
* @param chan adc channel to monitor
100
* @param low low threshhold for callback trigger
101
* @param high high threshhold for callback trigger
102
*/
103
extern
void
register_adc_watchdog(
uint32_t
adc,
uint8_t
chan,
uint16_t
low,
uint16_t
high, adc_watchdog_callback cb);
104
105
#endif
106
107
#endif
/* ADC_ARCH_H */
uint16_t
unsigned short uint16_t
Definition:
types.h:16
ADC2_END
@ ADC2_END
Definition:
adc_arch.h:70
ADC1_END
@ ADC1_END
Definition:
adc_arch.h:53
adc2_channels
adc2_channels
Definition:
adc_arch.h:56
adc1_channels
adc1_channels
Definition:
adc_arch.h:41
uint32_t
unsigned long uint32_t
Definition:
types.h:18
uint8_t
unsigned char uint8_t
Definition:
types.h:14
ADC3_END
@ ADC3_END
Definition:
adc_arch.h:87
ADC3_BEGIN
@ ADC3_BEGIN
Definition:
adc_arch.h:74
adc3_channels
adc3_channels
Definition:
adc_arch.h:73
ADC2_BEGIN
@ ADC2_BEGIN
Definition:
adc_arch.h:57
sw
airborne
arch
stm32
mcu_periph
adc_arch.h
Generated on Tue Feb 1 2022 13:51:12 for Paparazzi UAS by
1.8.17