From: Jan "Yenya" Kasprzak Date: Sun, 30 Sep 2012 19:56:41 +0000 (+0200) Subject: adc: suspend function X-Git-Tag: gerber-fab-20121029-1711~34 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=dac19fbca908b5e0179c7837451fa6fd8568889a;p=bike-lights.git adc: suspend function --- diff --git a/firmware/adc.c b/firmware/adc.c index 5252ae7..3fdbe32 100644 --- a/firmware/adc.c +++ b/firmware/adc.c @@ -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;