From 961568f72132c35bd41c3265e4aea983efd083b4 Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Wed, 28 May 2025 00:49:07 +0200 Subject: [PATCH] renamed makros M_IO_READ and M_IO_WRITE to inr and outr --- avr/common/utils_io.asm | 25 ++++++++++++++++++- avr/devices/all/hw_m8515.asm | 24 +++++++++--------- avr/modules/spi_hw/main.asm | 14 +++++------ avr/modules/uart_hw/attn.asm | 13 ++++++---- avr/modules/uart_hw/uart.asm | 47 ++++++++++++++++++------------------ avr/modules/xram/main.asm | 4 +-- 6 files changed, 77 insertions(+), 50 deletions(-) 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<