From 3b3ed72be8c7f64d0400c9ab2b6f6a394d2f837c Mon Sep 17 00:00:00 2001 From: jflyper Date: Mon, 18 Dec 2017 23:18:21 +0900 Subject: [PATCH] Add conditionals for MCU dependent ADC drivers --- src/main/drivers/adc_stm32f30x.c | 3 +++ src/main/drivers/adc_stm32f4xx.c | 3 +++ src/main/drivers/adc_stm32f7xx.c | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/main/drivers/adc_stm32f30x.c b/src/main/drivers/adc_stm32f30x.c index dd15960c56..8815def10d 100644 --- a/src/main/drivers/adc_stm32f30x.c +++ b/src/main/drivers/adc_stm32f30x.c @@ -21,6 +21,8 @@ #include "platform.h" +#ifdef USE_ADC + #include "drivers/accgyro/accgyro.h" #include "drivers/io.h" #include "drivers/sensor.h" @@ -219,3 +221,4 @@ void adcInit(const adcConfig_t *config) ADC_StartConversion(adc.ADCx); } +#endif diff --git a/src/main/drivers/adc_stm32f4xx.c b/src/main/drivers/adc_stm32f4xx.c index a089047d24..140fcfecbc 100644 --- a/src/main/drivers/adc_stm32f4xx.c +++ b/src/main/drivers/adc_stm32f4xx.c @@ -21,6 +21,8 @@ #include "platform.h" +#ifdef USE_ADC + #include "drivers/accgyro/accgyro.h" #include "drivers/system.h" @@ -199,3 +201,4 @@ void adcInit(const adcConfig_t *config) ADC_SoftwareStartConv(adc.ADCx); } +#endif diff --git a/src/main/drivers/adc_stm32f7xx.c b/src/main/drivers/adc_stm32f7xx.c index ff33f78ec1..fee9bea8d6 100644 --- a/src/main/drivers/adc_stm32f7xx.c +++ b/src/main/drivers/adc_stm32f7xx.c @@ -21,6 +21,8 @@ #include "platform.h" +#ifdef USE_ADC + #include "drivers/accgyro/accgyro.h" #include "drivers/system.h" @@ -196,3 +198,4 @@ void adcInit(const adcConfig_t *config) /* Start Conversation Error */ } } +#endif