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

index 5a4403797f1db1fb29af62faaae90ce386ebe84f..5a94f9a40789c6fb0ddce0dd41b6ea6030135080 100644 (file)
@@ -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;