From 2b735daae5fb5e2d0ae0cadd4da8b2715989d6d2 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 29 Mar 2017 13:01:35 -0400 Subject: [PATCH] timer: Make sure to reset the timer repeat checks on a shutdown Reset the timer repeat checks on shutdown, otherwise it is possible to get into an infinite shutdown loop. Signed-off-by: Kevin O'Connor --- src/avr/timer.c | 19 ++++++++++--------- src/generic/timer.c | 7 +++++++ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/avr/timer.c b/src/avr/timer.c index 588669c1..e9ec8dd0 100644 --- a/src/avr/timer.c +++ b/src/avr/timer.c @@ -95,15 +95,6 @@ timer_init(void) } DECL_INIT(timer_init); -static void -timer_shutdown(void) -{ - // Reenable timer irq - timer_set(timer_get() + 50); - TIFR1 = 1<