diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-02-10 19:07:13 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-02-10 19:07:13 +0000 |
commit | 610648a0b4a6115a3d73a40ae108fb18a75c1965 (patch) | |
tree | b60022b91db5775403fb1e1fca1b5ccd4f69e01e /nuttx/arch/arm/src/stm32/stm32_adc.c | |
parent | 8a161fa847642f5c652ec4541502c6a8de8a9696 (diff) | |
download | px4-nuttx-610648a0b4a6115a3d73a40ae108fb18a75c1965.tar.gz px4-nuttx-610648a0b4a6115a3d73a40ae108fb18a75c1965.tar.bz2 px4-nuttx-610648a0b4a6115a3d73a40ae108fb18a75c1965.zip |
Many STM32 header files updated for F3 support
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5635 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/stm32/stm32_adc.c')
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_adc.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_adc.c b/nuttx/arch/arm/src/stm32/stm32_adc.c index f58083468..5ed6c6fe9 100644 --- a/nuttx/arch/arm/src/stm32/stm32_adc.c +++ b/nuttx/arch/arm/src/stm32/stm32_adc.c @@ -63,9 +63,19 @@ #include "stm32.h" #include "stm32_adc.h" +/* ADC "upper half" support must be enabled */ + #ifdef CONFIG_ADC + +/* Some ADC peripheral must be enabled */ + #if defined(CONFIG_STM32_ADC1) || defined(CONFIG_STM32_ADC2) || defined(CONFIG_STM32_ADC3) +/* This implementation is for the STM32 F1, F2, and F4 only */ + +#if defined(CONFIG_STM32_STM32F10XX) || defined(CONFIG_STM32_STM32F20XX) || \ + defined(CONFIG_STM32_STM32F40XX) + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -1541,6 +1551,6 @@ struct adc_dev_s *stm32_adcinitialize(int intf, const uint8_t *chanlist, int nch return dev; } +#endif /* CONFIG_STM32_STM32F10XX || CONFIG_STM32_STM32F20XX || CONFIG_STM32_STM32F40XX */ #endif /* CONFIG_STM32_ADC || CONFIG_STM32_ADC2 || CONFIG_STM32_ADC3 */ #endif /* CONFIG_ADC */ - |