diff --git a/avr/modules/network/buffer.asm b/avr/modules/network/buffer.asm index 48c8c83..0308819 100644 --- a/avr/modules/network/buffer.asm +++ b/avr/modules/network/buffer.asm @@ -7,6 +7,10 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_BUFFER_ASM +#define AQH_AVR_NETWORK_BUFFER_ASM + + ; =========================================================================== ; defs @@ -260,3 +264,6 @@ NET_Buffer_CountUsed: ; @end + +#endif + diff --git a/avr/modules/network/data.asm b/avr/modules/network/data.asm index 255e372..b938f58 100644 --- a/avr/modules/network/data.asm +++ b/avr/modules/network/data.asm @@ -1,5 +1,5 @@ ; *************************************************************************** -; copyright : (C) 2025 by Martin Preuss +; copyright : (C) 2026 by Martin Preuss ; email : martin@libchipcard.de ; ; *************************************************************************** @@ -7,6 +7,9 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_DATA_ASM +#define AQH_AVR_NETWORK_DATA_ASM + .dseg @@ -21,3 +24,7 @@ networkDataBegin: networkDataEnd: + +#endif + + diff --git a/avr/modules/network/defs.asm b/avr/modules/network/defs.asm index b670706..3a57b39 100644 --- a/avr/modules/network/defs.asm +++ b/avr/modules/network/defs.asm @@ -1,5 +1,5 @@ ; *************************************************************************** -; copyright : (C) 2025 by Martin Preuss +; copyright : (C) 2026 by Martin Preuss ; email : martin@libchipcard.de ; ; *************************************************************************** @@ -7,14 +7,14 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_DEFS_ASM +#define AQH_AVR_NETWORK_DEFS_ASM + + ; defs -.equ NET_BUFFERS_SIZE = 28 ; CAVE: need to adapt routine NET_Buffer_Locate when changing this value!! - -;.equ NET_MSGNUMINBUF_SIZE = 8 ; max buffer nums in ringbuffer (global incoming) -;.equ NET_IFACE_OUTMSGBUF_SIZE = 8 ; max buffer nums in ringbuffer (per interface outbound) - +.equ NET_BUFFERS_SIZE = 28 ; CAVEAT: need to adapt routine NET_Buffer_Locate when changing this value!! .equ NET_IFACE_BUFFER_INUSE_BIT3 = 7 .equ NET_IFACE_BUFFER_INUSE_BIT2 = 6 @@ -64,4 +64,5 @@ +#endif diff --git a/avr/modules/network/iface.asm b/avr/modules/network/iface.asm index 0911a60..f142c6d 100644 --- a/avr/modules/network/iface.asm +++ b/avr/modules/network/iface.asm @@ -1,5 +1,5 @@ ; *************************************************************************** -; copyright : (C) 2025 by Martin Preuss +; copyright : (C) 2026 by Martin Preuss ; email : martin@libchipcard.de ; ; *************************************************************************** @@ -7,6 +7,9 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_IFACE_ASM +#define AQH_AVR_NETWORK_IFACE_ASM + .cseg @@ -251,4 +254,5 @@ NET_Interface_ResetStats: +#endif diff --git a/avr/modules/network/main.asm b/avr/modules/network/main.asm index 7ae2ae6..ded531e 100644 --- a/avr/modules/network/main.asm +++ b/avr/modules/network/main.asm @@ -7,6 +7,9 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_MAIN_ASM +#define AQH_AVR_NETWORK_MAIN_ASM + .cseg @@ -20,14 +23,6 @@ ; @clobbers R16, R17, X NET_Init: -#if 0 - ldi xh, HIGH(networkDataBegin) - ldi xl, LOW(networkDataBegin) - clr r16 - ldi r17, (networkDataEnd-networkDataBegin) - rcall Utils_FillSram ; (R17, X) -#endif - rcall NET_Buffer_Init ; (R16, R17, X) ldi r16, NET_MSGNUMINBUF_SIZE @@ -102,3 +97,6 @@ NET_PeekNextIncomingMsgNum: + +#endif + diff --git a/avr/modules/network/msg/addr-d.asm b/avr/modules/network/msg/addr-d.asm index 3e5cbdc..e04e8cf 100644 --- a/avr/modules/network/msg/addr-d.asm +++ b/avr/modules/network/msg/addr-d.asm @@ -1,5 +1,5 @@ ; *************************************************************************** -; copyright : (C) 2025 by Martin Preuss +; copyright : (C) 2026 by Martin Preuss ; email : martin@libchipcard.de ; ; *************************************************************************** @@ -7,8 +7,14 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_MSG_ADDR_D_ASM +#define AQH_AVR_NETWORK_MSG_ADDR_D_ASM + .equ NETMSG_ADDRESS_OFFS_UID = 4 .equ NETMSG_ADDRESS_OFFS_ADDRESS = 8 + +#endif + diff --git a/avr/modules/network/msg/addr-r.asm b/avr/modules/network/msg/addr-r.asm index c0f8c29..3271b8e 100644 --- a/avr/modules/network/msg/addr-r.asm +++ b/avr/modules/network/msg/addr-r.asm @@ -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 + diff --git a/avr/modules/network/msg/addr-w.asm b/avr/modules/network/msg/addr-w.asm index 2092e57..3338329 100644 --- a/avr/modules/network/msg/addr-w.asm +++ b/avr/modules/network/msg/addr-w.asm @@ -1,5 +1,5 @@ ; *************************************************************************** -; copyright : (C) 2025 by Martin Preuss +; copyright : (C) 2026 by Martin Preuss ; email : martin@libchipcard.de ; ; *************************************************************************** @@ -7,6 +7,9 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_MSG_ADDR_W_ASM +#define AQH_AVR_NETWORK_MSG_ADDR_W_ASM + ; --------------------------------------------------------------------------- ; @routine NETMSG_Address_Write @@ -37,3 +40,5 @@ NETMSG_Address_Write: +#endif + diff --git a/avr/modules/network/msg/common.asm b/avr/modules/network/msg/common.asm index 714ed49..faff8d0 100644 --- a/avr/modules/network/msg/common.asm +++ b/avr/modules/network/msg/common.asm @@ -7,6 +7,9 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_MSG_COMMON_ASM +#define AQH_AVR_NETWORK_MSG_COMMON_ASM + ; ; --------------------------------------------------------------------------- ; @routine NETMSG_Common_AddUidToBuffer @global @@ -92,3 +95,5 @@ NETMSG_CheckUidInMsg_notMe: +#endif + diff --git a/avr/modules/network/msg/crc.asm b/avr/modules/network/msg/crc.asm index c63551b..acd2102 100644 --- a/avr/modules/network/msg/crc.asm +++ b/avr/modules/network/msg/crc.asm @@ -1,5 +1,5 @@ ; *************************************************************************** -; copyright : (C) 2025 by Martin Preuss +; copyright : (C) 2026 by Martin Preuss ; email : martin@libchipcard.de ; ; *************************************************************************** @@ -7,6 +7,9 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_MSG_CRC_ASM +#define AQH_AVR_NETWORK_MSG_CRC_ASM + ; --------------------------------------------------------------------------- @@ -101,3 +104,6 @@ netMsgCrcCalc_l1: ; @end +#endif + + diff --git a/avr/modules/network/msg/debug-w.asm b/avr/modules/network/msg/debug-w.asm index 2eae766..804ae73 100644 --- a/avr/modules/network/msg/debug-w.asm +++ b/avr/modules/network/msg/debug-w.asm @@ -7,6 +7,9 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_MSG_DEBUG_ASM +#define AQH_AVR_NETWORK_MSG_DEBUG_ASM + ; --------------------------------------------------------------------------- @@ -90,3 +93,5 @@ NETMSG_Debug_Write2_loop: +#endif + diff --git a/avr/modules/network/msg/defs.asm b/avr/modules/network/msg/defs.asm index 17e4b67..8becdfd 100644 --- a/avr/modules/network/msg/defs.asm +++ b/avr/modules/network/msg/defs.asm @@ -1,5 +1,5 @@ ; *************************************************************************** -; copyright : (C) 2025 by Martin Preuss +; copyright : (C) 2026 by Martin Preuss ; email : martin@libchipcard.de ; ; *************************************************************************** @@ -7,6 +7,9 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_MSG_DEFS_ASM +#define AQH_AVR_NETWORK_MSG_DEFS_ASM + ; --------------------------------------------------------------------------- @@ -75,3 +78,6 @@ +#endif + + diff --git a/avr/modules/network/msg/device-w.asm b/avr/modules/network/msg/device-w.asm index c173d0b..f2948cd 100644 --- a/avr/modules/network/msg/device-w.asm +++ b/avr/modules/network/msg/device-w.asm @@ -1,5 +1,5 @@ ; *************************************************************************** -; copyright : (C) 2025 by Martin Preuss +; copyright : (C) 2026 by Martin Preuss ; email : martin@libchipcard.de ; ; *************************************************************************** @@ -7,6 +7,9 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_MSG_DEVICE_W_ASM +#define AQH_AVR_NETWORK_MSG_DEVICE_W_ASM + ; --------------------------------------------------------------------------- @@ -38,3 +41,5 @@ NETMSG_Device_Write: +#endif + diff --git a/avr/modules/network/msg/pong-w.asm b/avr/modules/network/msg/pong-w.asm index 5a70f9b..bd6f1da 100644 --- a/avr/modules/network/msg/pong-w.asm +++ b/avr/modules/network/msg/pong-w.asm @@ -1,5 +1,5 @@ ; *************************************************************************** -; copyright : (C) 2025 by Martin Preuss +; copyright : (C) 2026 by Martin Preuss ; email : martin@libchipcard.de ; ; *************************************************************************** @@ -7,6 +7,9 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_MSG_PONG_W_ASM +#define AQH_AVR_NETWORK_MSG_PONG_W_ASM + ; --------------------------------------------------------------------------- @@ -35,3 +38,5 @@ NETMSG_Pong_Write: +#endif + diff --git a/avr/modules/network/msg/range-d.asm b/avr/modules/network/msg/range-d.asm index 723d8cc..3d29e3e 100644 --- a/avr/modules/network/msg/range-d.asm +++ b/avr/modules/network/msg/range-d.asm @@ -1,5 +1,5 @@ ; *************************************************************************** -; copyright : (C) 2025 by Martin Preuss +; copyright : (C) 2026 by Martin Preuss ; email : martin@libchipcard.de ; ; *************************************************************************** @@ -7,6 +7,8 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_MSG_RANGE_D_ASM +#define AQH_AVR_NETWORK_MSG_RANGE_D_ASM .equ NETMSG_RANGE_OFFS_UID = 4 @@ -15,4 +17,5 @@ +#endif diff --git a/avr/modules/network/msg/range-r.asm b/avr/modules/network/msg/range-r.asm index ad46e4c..28b31cc 100644 --- a/avr/modules/network/msg/range-r.asm +++ b/avr/modules/network/msg/range-r.asm @@ -1,5 +1,5 @@ ; *************************************************************************** -; copyright : (C) 2025 by Martin Preuss +; copyright : (C) 2026 by Martin Preuss ; email : martin@libchipcard.de ; ; *************************************************************************** @@ -7,6 +7,9 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_MSG_RANGE_R_ASM +#define AQH_AVR_NETWORK_MSG_RANGE_R_ASM + ; *************************************************************************** ; code @@ -36,3 +39,5 @@ NETMSG_Range_Read: +#endif + diff --git a/avr/modules/network/msg/range-w.asm b/avr/modules/network/msg/range-w.asm index 1511da4..ccabd92 100644 --- a/avr/modules/network/msg/range-w.asm +++ b/avr/modules/network/msg/range-w.asm @@ -7,6 +7,9 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_MSG_RANGE_W_ASM +#define AQH_AVR_NETWORK_MSG_RANGE_W_ASM + ; --------------------------------------------------------------------------- ; @routine NETMSG_Range_Write @@ -42,3 +45,5 @@ NETMSG_Range_Write: +#endif + diff --git a/avr/modules/network/msg/reboot-d.asm b/avr/modules/network/msg/reboot-d.asm index b605ebd..a946366 100644 --- a/avr/modules/network/msg/reboot-d.asm +++ b/avr/modules/network/msg/reboot-d.asm @@ -1,5 +1,5 @@ ; *************************************************************************** -; copyright : (C) 2025 by Martin Preuss +; copyright : (C) 2026 by Martin Preuss ; email : martin@libchipcard.de ; ; *************************************************************************** @@ -7,8 +7,13 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_MSG_REBOOT_D_ASM +#define AQH_AVR_NETWORK_MSG_REBOOT_D_ASM + .equ NETMSG_REBOOTREQ_OFFS_UID = 4 +#endif + diff --git a/avr/modules/network/msg/reboot-r.asm b/avr/modules/network/msg/reboot-r.asm index 29af0f2..ce74f5b 100644 --- a/avr/modules/network/msg/reboot-r.asm +++ b/avr/modules/network/msg/reboot-r.asm @@ -1,5 +1,5 @@ ; *************************************************************************** -; copyright : (C) 2025 by Martin Preuss +; copyright : (C) 2026 by Martin Preuss ; email : martin@libchipcard.de ; ; *************************************************************************** @@ -7,6 +7,9 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_MSG_REBOOT_R_ASM +#define AQH_AVR_NETWORK_MSG_REBOOT_R_ASM + ; *************************************************************************** ; code @@ -39,3 +42,5 @@ NETMSG_RebootRequestRead: ; @end +#endif + diff --git a/avr/modules/network/msg/recvstats-w.asm b/avr/modules/network/msg/recvstats-w.asm index 750b775..4cbffb3 100644 --- a/avr/modules/network/msg/recvstats-w.asm +++ b/avr/modules/network/msg/recvstats-w.asm @@ -1,5 +1,5 @@ ; *************************************************************************** -; copyright : (C) 2025 by Martin Preuss +; copyright : (C) 2026 by Martin Preuss ; email : martin@libchipcard.de ; ; *************************************************************************** @@ -7,6 +7,9 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_MSG_RECVSTATS_W_ASM +#define AQH_AVR_NETWORK_MSG_RECVSTATS_W_ASM + ; --------------------------------------------------------------------------- @@ -70,3 +73,6 @@ NETMSG_RecvStats_Write: +#endif + + diff --git a/avr/modules/network/msg/sendstats-w.asm b/avr/modules/network/msg/sendstats-w.asm index b794bcc..8498a6c 100644 --- a/avr/modules/network/msg/sendstats-w.asm +++ b/avr/modules/network/msg/sendstats-w.asm @@ -1,5 +1,5 @@ ; *************************************************************************** -; copyright : (C) 2025 by Martin Preuss +; copyright : (C) 2026 by Martin Preuss ; email : martin@libchipcard.de ; ; *************************************************************************** @@ -7,6 +7,9 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_MSG_SENDSTATS_W_ASM +#define AQH_AVR_NETWORK_MSG_SENDSTATS_W_ASM + ; --------------------------------------------------------------------------- @@ -55,3 +58,5 @@ NETMSG_SendStats_Write: +#endif + diff --git a/avr/modules/network/msg/simplemsg-w.asm b/avr/modules/network/msg/simplemsg-w.asm index 16d1738..a5e337b 100644 --- a/avr/modules/network/msg/simplemsg-w.asm +++ b/avr/modules/network/msg/simplemsg-w.asm @@ -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_SIMPLEMSG_W_ASM +#define AQH_AVR_NETWORK_MSG_SIMPLEMSG_W_ASM + + ; *************************************************************************** ; code @@ -40,3 +44,6 @@ NETMSG_SimpleMsgWrite: ; @end + +#endif + diff --git a/avr/modules/network/msg/value-d.asm b/avr/modules/network/msg/value-d.asm index c1459f2..c377c94 100644 --- a/avr/modules/network/msg/value-d.asm +++ b/avr/modules/network/msg/value-d.asm @@ -1,5 +1,5 @@ ; *************************************************************************** -; copyright : (C) 2025 by Martin Preuss +; copyright : (C) 2026 by Martin Preuss ; email : martin@libchipcard.de ; ; *************************************************************************** @@ -7,6 +7,9 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_MSG_VALUE_D_ASM +#define AQH_AVR_NETWORK_MSG_VALUE_D_ASM + .equ NETMSG_VALUE_OFFS_UID = 4 .equ NETMSG_VALUE_OFFS_MSGID = 8 @@ -14,3 +17,6 @@ .equ NETMSG_VALUE_OFFS_VALUE = 12 .equ NETMSG_VALUE_OFFS_DENOM = 14 + +#endif + diff --git a/avr/modules/network/msg/value-r.asm b/avr/modules/network/msg/value-r.asm index ee77b39..d38fea0 100644 --- a/avr/modules/network/msg/value-r.asm +++ b/avr/modules/network/msg/value-r.asm @@ -1,5 +1,5 @@ ; *************************************************************************** -; copyright : (C) 2025 by Martin Preuss +; copyright : (C) 2026 by Martin Preuss ; email : martin@libchipcard.de ; ; *************************************************************************** @@ -7,6 +7,9 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_MSG_VALUE_R_ASM +#define AQH_AVR_NETWORK_MSG_VALUE_R_ASM + ; *************************************************************************** ; code @@ -44,3 +47,6 @@ NETMSG_ValueRead: ; @end + +#endif + diff --git a/avr/modules/network/msg/value-w.asm b/avr/modules/network/msg/value-w.asm index 0c18fbd..6d2731d 100644 --- a/avr/modules/network/msg/value-w.asm +++ b/avr/modules/network/msg/value-w.asm @@ -1,5 +1,5 @@ ; *************************************************************************** -; copyright : (C) 2025 by Martin Preuss +; copyright : (C) 2026 by Martin Preuss ; email : martin@libchipcard.de ; ; *************************************************************************** @@ -7,6 +7,9 @@ ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** +#ifndef AQH_AVR_NETWORK_MSG_VALUE_W_ASM +#define AQH_AVR_NETWORK_MSG_VALUE_W_ASM + ; *************************************************************************** ; code @@ -125,3 +128,5 @@ netMsgValueWrite: ; @end +#endif +