diff --git a/sw/airborne/adc_generic.c b/sw/airborne/adc_generic.c index 00dbfb7193..7fee125b55 100644 --- a/sw/airborne/adc_generic.c +++ b/sw/airborne/adc_generic.c @@ -2,17 +2,19 @@ #include "adc.h" #include CONFIG -#ifdef ADC_CHANNEL_GENERIC1 +#ifdef USE_ADC_GENERIC uint16_t adc_generic_val1; +uint16_t adc_generic_val2; +#endif + +#ifdef ADC_CHANNEL_GENERIC1 static struct adc_buf buf_generic1; #endif #ifdef ADC_CHANNEL_GENERIC2 -uint16_t adc_generic_val2; static struct adc_buf buf_generic2; #endif - void adc_generic_init( void ) { #ifdef ADC_CHANNEL_GENERIC1 adc_buf_channel(ADC_CHANNEL_GENERIC1, &buf_generic1, ADC_CHANNEL_GENERIC_NB_SAMPLES);