EFM32, STM32, TIVA: Allow lower half driver to build if any ADC is selected. Should not depend on CONFIG_ADC.

This commit is contained in:
Gregory Nutt 2016-05-27 06:46:33 -06:00
parent 3e7b2d617a
commit 3d3b7b5422
5 changed files with 10 additions and 15 deletions

View File

@ -65,9 +65,9 @@
#include "efm32.h"
#include "efm32_adc.h"
/* ADC "upper half" support must be enabled */
/* ADC "lower half" support must be enabled */
#ifdef CONFIG_ADC
#ifdef CONFIG_EFM32_ADC
/* Some ADC peripheral must be enabled */
@ -1316,4 +1316,4 @@ struct adc_dev_s *efm32_adcinitialize(int intf, const uint8_t *chanlist, int nch
#endif /* CONFIG_EFM32_EFM32GG */
#endif /* CONFIG_EFM32_ADC1 */
#endif /* CONFIG_ADC */
#endif /* CONFIG_EFM32_ADC */

View File

@ -203,7 +203,7 @@ CHIP_CSRCS += stm32_rtc_lowerhalf.c
endif
endif
ifeq ($(CONFIG_ADC),y)
ifeq ($(CONFIG_STM32_ADC),y)
CHIP_CSRCS += stm32_adc.c
endif

View File

@ -69,7 +69,7 @@
/* ADC "upper half" support must be enabled */
#ifdef CONFIG_ADC
#ifdef CONFIG_STM32_ADC
/* Some ADC peripheral must be enabled */
@ -3046,4 +3046,4 @@ struct adc_dev_s *stm32_adcinitialize(int intf, FAR const uint8_t *chanlist,
#endif /* CONFIG_STM32_ADC1 || CONFIG_STM32_ADC2 ||
* CONFIG_STM32_ADC3 || CONFIG_STM32_ADC4
*/
#endif /* CONFIG_ADC */
#endif /* CONFIG_STM32_ADC */

View File

@ -165,16 +165,11 @@ extern "C"
#define EXTERN extern
#endif
/****************************************************************************
* Inline Functions
****************************************************************************/
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
/* Only allow access to upper level ADC drivers if they are enabled */
#ifdef CONFIG_ADC
#ifdef CONFIG_TIVA_ADC
/****************************************************************************
* Driver Function Prototypes
@ -228,7 +223,7 @@ void tiva_adc_lock(FAR struct tiva_adc_s *priv, int sse);
void tiva_adc_unlock(FAR struct tiva_adc_s *priv, int sse);
#endif /* CONFIG_ADC */
#endif /* CONFIG_TIVA_ADC */
/****************************************************************************
* Library Function Prototypes

View File

@ -82,7 +82,7 @@
#include "chip/tiva_pinmap.h"
#include "chip/tiva_syscontrol.h"
#if defined (CONFIG_TIVA_ADC) && defined (CONFIG_ADC)
#ifdef CONFIG_TIVA_ADC
/****************************************************************************
* Pre-processor Definitions
@ -1086,4 +1086,4 @@ static void tiva_adc_dump_dev(void)
}
#endif
#endif /* CONFIG_TIVA_ADC && CONFIG_ADC */
#endif /* CONFIG_TIVA_ADC */