dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pios_internal_adc_priv.h
Go to the documentation of this file.
1 
15 /*
16  * This program is free software; you can redistribute it and/or modify
17  * it under the terms of the GNU General Public License as published by
18  * the Free Software Foundation; either version 3 of the License, or
19  * (at your option) any later version.
20  *
21  * This program is distributed in the hope that it will be useful, but
22  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
23  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24  * for more details.
25  *
26  * You should have received a copy of the GNU General Public License along
27  * with this program; if not, see <http://www.gnu.org/licenses/>
28  */
29 
30 #ifndef PIOS_INTERNAL_ADC_PRIV_H
31 #define PIOS_INTERNAL_ADC_PRIV_H
32 
33 #include <pios.h>
34 #include <pios_stm32.h>
35 #include <pios_internal_adc.h>
36 
37 extern const struct pios_adc_driver pios_internal_adc_driver;
38 
42 struct adc_pin {
43  GPIO_TypeDef *port;
44  uint32_t pin;
45  uint8_t adc_channel;
46 #if !defined(STM32F40_41xxx)
48 #endif /* !STM32F40_41xxx */
49 };
50 
55  ADC_TypeDef* adc_dev_master;
56 #if !defined(STM32F40_41xxx)
57  ADC_TypeDef* adc_dev_slave;
58 #endif /* !STM32F40_41xxx */
59  struct stm32_dma dma;
60  uint32_t half_flag;
61  uint32_t full_flag;
62  uint32_t oversampling;
63  uint8_t adc_pin_count;
64  struct adc_pin adc_pins[];
65 };
66 
67 extern int32_t PIOS_INTERNAL_ADC_Init(uintptr_t * internal_adc_id, const struct pios_internal_adc_cfg * cfg);
68 
69 #endif /* PIOS_INTERNAL_ADC_PRIV_H */
70 
Types that are specific to the STM32 peripherals.
Main PiOS header to include all the compiled in PiOS options.
int32_t PIOS_INTERNAL_ADC_Init(uintptr_t *internal_adc_id, const struct pios_internal_adc_cfg *cfg)
static struct flyingpicmd_cfg_fa cfg
Definition: main.c:49
const struct pios_adc_driver pios_internal_adc_driver
GPIO_TypeDef * port
ADC functions header.