]> www.fi.muni.cz Git - bike-lights.git/commitdiff
adc: suspend function
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Sun, 30 Sep 2012 19:56:41 +0000 (21:56 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Sun, 30 Sep 2012 19:56:41 +0000 (21:56 +0200)
firmware/adc.c

index 5252ae7edc1cc2b6554ebb8e2f9486221e19eeec..3fdbe3262f3d6467364cd1a73063abd0d3be75e7 100644 (file)
@@ -74,6 +74,12 @@ void init_adc()
        ADCSRA |= _BV(ADIE); // enable IRQ
 }
 
+void susp_adc()
+{
+       ADCSRA = 0;
+       DIDR0 = 0;
+}
+
 ISR(ADC_vect) { // IRQ handler
        uint16_t adcval = ADCW;