From b9d8dc2ae14331f66ec5f79d02fcff672879eeb5 Mon Sep 17 00:00:00 2001 From: batt Date: Mon, 10 Nov 2008 21:42:43 +0000 Subject: [PATCH] Merged from external project: ********** r22631 | batt | 2008-11-10 22:33:41 +0100 (lun, 10 nov 2008) | 1 line Not all AVRs have ADCSRB register: make it conditional. ********** git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1918 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/avr/drv/adc_avr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bertos/cpu/avr/drv/adc_avr.c b/bertos/cpu/avr/drv/adc_avr.c index bf5a5600..6d10b934 100644 --- a/bertos/cpu/avr/drv/adc_avr.c +++ b/bertos/cpu/avr/drv/adc_avr.c @@ -34,7 +34,7 @@ * \version $Id$ * \author Francesco Sacchi * - * This module is automatically included so no need to include + * This module is automatically included so no need to include * in test list. * notest: avr */ @@ -146,8 +146,10 @@ INLINE void adc_hw_init(void) #error Unsupported ADC ref value. #endif + #if defined(ADCSRB) /* Disable Auto trigger source: ADC in Free running mode. */ ADCSRB = 0; + #endif /* Enable ADC, disable autotrigger mode. */ ADCSRA = BV(ADEN); -- 2.25.1