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<