From: Jan "Yenya" Kasprzak Date: Sun, 30 Sep 2012 19:57:14 +0000 (+0200) Subject: tmr: suspend function X-Git-Tag: gerber-fab-20121029-1711~32 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=d4506bca9ee4231571d99a4291f8295e9245ad7a;p=bike-lights.git tmr: suspend function --- diff --git a/firmware/tmr.c b/firmware/tmr.c index 5a44037..5a94f9a 100644 --- a/firmware/tmr.c +++ b/firmware/tmr.c @@ -18,6 +18,13 @@ void init_tmr() pattern_div = PATTERN_DIV; } +void susp_tmr() +{ + TCCR0A = TCCR0B = 0; + TIMSK &= ~_BV(OCIE0A); + TIFR = 0; +} + ISR(TIMER0_COMPA_vect) { ++jiffies;