diff --git a/arch/arm/src/stm32/hardware/stm32_adc_v1.h b/arch/arm/src/stm32/hardware/stm32_adc_v1.h index db723d2818..9f169f51ad 100644 --- a/arch/arm/src/stm32/hardware/stm32_adc_v1.h +++ b/arch/arm/src/stm32/hardware/stm32_adc_v1.h @@ -45,6 +45,10 @@ #include "chip.h" +/**************************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************************/ + /* This is implementation for STM32 ADC IPv1 - F1, F2, F37x, F4, F7. * NOTE: L1 use modified IPv1 (look at chip/stm32_adc_v1l1.h). */ @@ -76,10 +80,6 @@ # undef HAVE_ADC_VBAT #endif -/**************************************************************************************************** - * Pre-processor Definitions - ****************************************************************************************************/ - /* For the basic ADC IPv1, the ADCx_BASE definitions are defined in chip/stm32xxx_memorymap.h files */ #ifndef HAVE_BASIC_ADC diff --git a/arch/arm/src/stm32/stm32_adc.c b/arch/arm/src/stm32/stm32_adc.c index 506c3c7cb7..44a515a5d6 100644 --- a/arch/arm/src/stm32/stm32_adc.c +++ b/arch/arm/src/stm32/stm32_adc.c @@ -2405,7 +2405,7 @@ static void adc_calibrate(FAR struct stm32_dev_s *priv) UNUSED(priv); #endif } -#elif defined(HAVE_IP_ADC_V1) +#elif defined(HAVE_IP_ADC_V1) && defined(HAVE_BASIC_ADC) static void adc_calibrate(FAR struct stm32_dev_s *priv) { /* Power on the ADC */