diff --git a/avr/timer.asm b/avr/timer.asm index ad5b73b..9e080cf 100644 --- a/avr/timer.asm +++ b/avr/timer.asm @@ -132,11 +132,20 @@ Timer_Run_check1m: lds r16, timerModuleCounter1m inc r16 sts timerModuleCounter1m, r16 + cpi r16, 30 ; check for every 30s + brne Timer_Run_l4 + push r16 + push r17 + rcall onEvery30s + pop r17 + pop r16 +Timer_Run_l4: cpi r16, 60 brcs Timer_Run_l2 clr r16 sts timerModuleCounter1m, r16 push r17 + rcall onEvery30s rcall onEveryMinute pop r17