From 5cb0a63beecaa9ff78b2ee9126ff56a02faf38e9 Mon Sep 17 00:00:00 2001 From: Martin Guy Date: Thu, 21 Apr 2011 19:09:19 +0200 Subject: [PATCH] Fix defines so that inclusion of ADC code is controlled by BUILD_ADC (previously, if NUM_ADC>0 but !BUILD_ADC, compilation failed with unresolved symbols) --- src/platform/avr32/platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/avr32/platform.c b/src/platform/avr32/platform.c index bd65c6d4..7b71f06a 100644 --- a/src/platform/avr32/platform.c +++ b/src/platform/avr32/platform.c @@ -37,7 +37,7 @@ extern int pm_configure_clocks( pm_freq_param_t *param ); static u32 platform_timer_set_clock( unsigned id, u32 clock ); -#if NUM_ADC > 0 +#ifdef BUILD_ADC __attribute__((__interrupt__)) static void adc_int_handler(); #endif @@ -176,7 +176,7 @@ int platform_init() #endif -#if NUM_ADC > 0 +#ifdef BUILD_ADC (&AVR32_ADC)->ier = AVR32_ADC_DRDY_MASK; INTC_register_interrupt( &adc_int_handler, AVR32_ADC_IRQ, AVR32_INTC_INT0);