From 39ac2613bb7a249080e0078dc6af1a4ff98a7f62 Mon Sep 17 00:00:00 2001 From: Stefan Rupp Date: Sun, 9 Mar 2014 00:36:20 +0100 Subject: [PATCH] only disable interrupts temporarily, not permanently --- rtc.c | 2 ++ timer.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/rtc.c b/rtc.c index 589e1d4..5076b81 100644 --- a/rtc.c +++ b/rtc.c @@ -25,6 +25,7 @@ ISR(TIMER2_OVF_vect) { void rtc_init(uint32_t rtc_time) { // Stop all interrupts + uint8_t sreg = SREG; cli(); TCCR2B = 0; TCCR2A = 0; @@ -37,6 +38,7 @@ void rtc_init(uint32_t rtc_time) TCCR2B = (1<