]> www.fi.muni.cz Git - bike-lights.git/blobdiff - firmware/tmr.c
tmr: suspend function
[bike-lights.git] / 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;