Silence uninitialized value warning.
[bertos.git] / bertos / cpu / avr / drv / adc_avr.c
index bf5a5600d7e41fb303d4b35aee64b0392e87565a..6d10b934c345fa7817737d885e4370820dfc7b88 100644 (file)
@@ -34,7 +34,7 @@
  * \version $Id$
  * \author Francesco Sacchi <batt@develer.com>
  *
- * 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);