From ab3b2be7254e44f87b063755058df74dea3883ee Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Sat, 17 May 2025 13:19:54 +0200 Subject: [PATCH] consequently use M_IO_READ and M_IO_WRITE. on tn841 those are in the extended io space, on most others in normal io space. --- avr/modules/uart_hw/m_lowlevel_uart.asm | 58 +++++++++++++------------ 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/avr/modules/uart_hw/m_lowlevel_uart.asm b/avr/modules/uart_hw/m_lowlevel_uart.asm index 1985b1f..6e028c4 100644 --- a/avr/modules/uart_hw/m_lowlevel_uart.asm +++ b/avr/modules/uart_hw/m_lowlevel_uart.asm @@ -30,12 +30,16 @@ ldi r17, 0 .endif - sts UBRR@0H, r17 - sts UBRR@0L, r16 + M_IO_WRITE UBRR@0H, r17 + M_IO_WRITE UBRR@0L, r16 ; set character format +.ifdef URSEL + ldi r16, (1<