minor beautifications.
This commit is contained in:
@@ -68,20 +68,27 @@ systemSetSpeed:
|
||||
systemSleep:
|
||||
; only modify SE, SM2, SM1 and SM0
|
||||
cli
|
||||
|
||||
M_IO_READ r16, MCUCR
|
||||
cbr r16, (1<<SE) | (1<<SM2) | (1<<SM1)
|
||||
M_IO_WRITE MCUCR, r16
|
||||
|
||||
M_IO_READ r16, EMCUCR
|
||||
cbr r16, (1<<SM0)
|
||||
M_IO_WRITE EMCUCR, r16
|
||||
|
||||
sei ; make sure interrupts really are enabled
|
||||
|
||||
M_IO_READ r16, MCUCR ; enable sleep mode
|
||||
sbr r16, (1<<SE)
|
||||
M_IO_WRITE MCUCR, r16
|
||||
|
||||
sleep ; sleep, wait for interrupt
|
||||
|
||||
M_IO_READ r16, MCUCR ; disable sleep mode
|
||||
cbr r16, (1<<SE)
|
||||
M_IO_WRITE MCUCR, r16
|
||||
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user