diff --git a/avr/common/utils_io.asm b/avr/common/utils_io.asm index 8309a1e..e9f3a1f 100644 --- a/avr/common/utils_io.asm +++ b/avr/common/utils_io.asm @@ -7,7 +7,7 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** - +#if 0 ; M_IO_READ DEST, SRC .macro M_IO_READ .if @1 < 64 @@ -27,3 +27,26 @@ sts @0, @1 .endif .endmacro + +#endif + + +; inr DEST, SRC +.macro inr +.if @1 < 64 + in @0, @1 +.else + lds @0, @1 +.endif +.endmacro + + + +; outr DEST, SRC +.macro outr +.if @0 < 64 + out @0, @1 +.else + sts @0, @1 +.endif +.endmacro diff --git a/avr/devices/all/hw_m8515.asm b/avr/devices/all/hw_m8515.asm index 040bc8e..f5cc047 100644 --- a/avr/devices/all/hw_m8515.asm +++ b/avr/devices/all/hw_m8515.asm @@ -69,25 +69,25 @@ systemSleep: ; only modify SE, SM2, SM1 and SM0 cli - M_IO_READ r16, MCUCR + inr r16, MCUCR cbr r16, (1<