avr/modules/network: added messages.

This commit is contained in:
Martin Preuss
2025-04-29 00:36:20 +02:00
parent 1e90682605
commit c1a67a36ef
7 changed files with 143 additions and 7 deletions

View File

@@ -56,3 +56,39 @@ NETMSG_AddNextMsgIdToBuffer:
; ---------------------------------------------------------------------------
; @routine NETMSG_CheckUidInMsg
;
; Compare the UID from a message against our own UID.
;
; @param X pointer to UID in a message to compare against out own uid
; @return CFLAG set if matches, cleared otherwise
; @clobbers r16, r18, r19, r20, r21, X
NETMSG_CheckUidInMsg:
push xl
push xh
rcall Utils_ReadUid
pop xh
pop xl
ld r16, X+
cp r16, r18
brne NETMSG_CheckUidInMsg_notMe
ld r16, X+
cp r16, r19
brne NETMSG_CheckUidInMsg_notMe
ld r16, X+
cp r16, r20
brne NETMSG_CheckUidInMsg_notMe
ld r16, X+
cp r16, r21
brne NETMSG_CheckUidInMsg_notMe
sec
ret
NETMSG_CheckUidInMsg_notMe:
clc
ret
; @end