avr: guard with precompiler directives.

This commit is contained in:
Martin Preuss
2026-04-26 12:47:50 +02:00
parent 240624c727
commit 74e471ef28
25 changed files with 160 additions and 36 deletions

View File

@@ -1,5 +1,5 @@
; ***************************************************************************
; copyright : (C) 2025 by Martin Preuss
; copyright : (C) 2026 by Martin Preuss
; email : martin@libchipcard.de
;
; ***************************************************************************
@@ -7,6 +7,10 @@
; * Please see toplevel file COPYING of that project for license details. *
; ***************************************************************************
#ifndef AQH_AVR_NETWORK_MSG_ADDR_R_ASM
#define AQH_AVR_NETWORK_MSG_ADDR_R_ASM
; ***************************************************************************
; code
@@ -15,8 +19,8 @@
; ---------------------------------------------------------------------------
; @routine NETMSG_ValueRead @global
; Read a VALUE message.
; @routine NETMSG_Address_Read @global
; Read an ADDRESS message.
;
; @param X buffer to read from
; @return R18 command
@@ -24,7 +28,7 @@
; @clobbers R18, R19
NETMSG_Address_Read:
adiw xh:xl, 2
adiw xh:xl, NETMSG_OFFS_CMD
ld r18, X+ ; command
adiw xh:xl, 5 ; skip src addr and uid
ld r19, X+ ; addr
@@ -34,3 +38,5 @@ NETMSG_Address_Read:
#endif