X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?p=tinyboard.git;a=blobdiff_plain;f=projects%2Fstep-up%2Fwdt.c;fp=projects%2Fstep-up%2Fwdt.c;h=cb94ec8bc5260b054170404846ef50f61ead66ea;hp=15bfbbb54f1374069ea6bd01d1e4b44b8247fffc;hb=ccfee4572d781e2007f36ac30f1c80a7ef43e9ef;hpb=e6421ff2a4cecb87d997afff76dddc3eb1ba936a diff --git a/projects/step-up/wdt.c b/projects/step-up/wdt.c index 15bfbbb..cb94ec8 100644 --- a/projects/step-up/wdt.c +++ b/projects/step-up/wdt.c @@ -17,10 +17,16 @@ void susp_wdt() ISR(WDT_vect) { ++jiffies; + if (pwm_enabled) { + need_pwmled_adc = 1; + } + if (jiffies & 0x000F) { need_battery_adc = 1; // about every 1s } patterns_next_tick(); timer_check_buttons(); + if (!adc_enabled) + start_next_adc(); // only if not running }