From 9a19bf739d010a40e7727c7f8cecdd8a060de124 Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Wed, 28 May 2025 00:50:52 +0200 Subject: [PATCH] fixed a bug (wrong register). --- avr/modules/flash/io_uart_all_attn.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/avr/modules/flash/io_uart_all_attn.asm b/avr/modules/flash/io_uart_all_attn.asm index 4918dfd..0fd500c 100644 --- a/avr/modules/flash/io_uart_all_attn.asm +++ b/avr/modules/flash/io_uart_all_attn.asm @@ -324,9 +324,9 @@ ioRawRecvMsg: ; read first two bytes ldi r17, 2 ; 2 bytes: address byte, msg len add r19, r17 - rcall ioRawRecvBytes ; (r16, r17, r18, r22) + rcall ioRawRecvBytes ; (r16, r17, r20, r22) brcc ioRawRecvMsg_error - cp r16, r20 ; check size + cp r16, r18 ; check size brcc ioRawRecvMsg_error inc r16 ; account for checksum byte ; read remaining bytes including checksum byte