avr: try calculating idle times.
This commit is contained in:
@@ -70,6 +70,8 @@ main_loop:
|
||||
; sbi PINA, PORTA2 ; debug (toggle)
|
||||
; cbi PORTA, PORTA2 ; debug (on)
|
||||
; sbi PORTA, PORTA2 ; debug (off)
|
||||
|
||||
rcall Timer_BeforeSleep
|
||||
|
||||
; only modify SE, SM1 and SM0
|
||||
in r16, MCUCR
|
||||
@@ -79,6 +81,7 @@ main_loop:
|
||||
ori r16, (1<<SE) ; sleep mode "idle", enable
|
||||
out MCUCR, r16
|
||||
sleep ; sleep, wait for interrupt
|
||||
rcall Timer_AfterSleep
|
||||
rjmp main_loop
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user