From 1565d3aab6a0f668798f2549bbb15d8bee951dae Mon Sep 17 00:00:00 2001 From: blckmn Date: Sun, 13 Nov 2016 16:16:05 +1100 Subject: [PATCH] Fixed build errors on targets with no defined ADC pins --- src/main/drivers/adc_stm32f10x.c | 4 ---- src/main/drivers/adc_stm32f4xx.c | 4 ---- src/main/drivers/adc_stm32f7xx.c | 4 ---- 3 files changed, 12 deletions(-) diff --git a/src/main/drivers/adc_stm32f10x.c b/src/main/drivers/adc_stm32f10x.c index 7746b7198..f6a98f8af 100644 --- a/src/main/drivers/adc_stm32f10x.c +++ b/src/main/drivers/adc_stm32f10x.c @@ -80,10 +80,6 @@ const adcTagMap_t adcTagMap[] = { void adcInit(adcConfig_t *config) { -#if !defined(VBAT_ADC_PIN) && !defined(EXTERNAL1_ADC_PIN) && !defined(RSSI_ADC_PIN) && !defined(CURRENT_METER_ADC_PIN) - UNUSED(init); -#endif - uint8_t configuredAdcChannels = 0; memset(&adcOperatingConfig, 0, sizeof(adcOperatingConfig)); diff --git a/src/main/drivers/adc_stm32f4xx.c b/src/main/drivers/adc_stm32f4xx.c index 4c9dc9e3c..f79e1954e 100644 --- a/src/main/drivers/adc_stm32f4xx.c +++ b/src/main/drivers/adc_stm32f4xx.c @@ -93,10 +93,6 @@ void adcInit(adcConfig_t *config) memset(&adcOperatingConfig, 0, sizeof(adcOperatingConfig)); -#if !defined(VBAT_ADC_PIN) && !defined(EXTERNAL1_ADC_PIN) && !defined(RSSI_ADC_PIN) && !defined(CURRENT_METER_ADC_PIN) - UNUSED(init); -#endif - if (config->vbat.enabled) { adcOperatingConfig[ADC_BATTERY].tag = config->vbat.ioTag; } diff --git a/src/main/drivers/adc_stm32f7xx.c b/src/main/drivers/adc_stm32f7xx.c index 4a5ce2426..215faf3e9 100644 --- a/src/main/drivers/adc_stm32f7xx.c +++ b/src/main/drivers/adc_stm32f7xx.c @@ -93,10 +93,6 @@ void adcInit(adcConfig_t *config) memset(&adcOperatingConfig, 0, sizeof(adcOperatingConfig)); -#if !defined(VBAT_ADC_PIN) && !defined(EXTERNAL1_ADC_PIN) && !defined(RSSI_ADC_PIN) && !defined(CURRENT_METER_ADC_PIN) - UNUSED(init); -#endif - if (config->vbat.enabled) { adcOperatingConfig[ADC_BATTERY].tag = config->vbat.ioTag; }