avr: guard with precompiler directives.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user