Files
aqhomecontrol/avr/modules/network/msg/reboot-r.asm

42 lines
1.2 KiB
NASM

; ***************************************************************************
; copyright : (C) 2025 by Martin Preuss
; email : martin@libchipcard.de
;
; ***************************************************************************
; * This file is part of the project "AqHome". *
; * Please see toplevel file COPYING of that project for license details. *
; ***************************************************************************
; ***************************************************************************
; code
.cseg
; ---------------------------------------------------------------------------
; @routine NETMSG_RebootRequestRead @global
; Read a VALUE message.
;
; @return CFLAG set if the UID from the message matches the uid of this node
; @return R16 source address
; @param X buffer to read from
; @clobbers r16, r18, r19, r20, r21
NETMSG_RebootRequestRead:
adiw xh:xl, NETMSG_OFFS_SRCADDR
ld r16, X
sbiw xh:xl, NETMSG_OFFS_SRCADDR
push r16
push xl
push xh
adiw xh:xl, NETMSG_REBOOTREQ_OFFS_UID
bigcall NETMSG_CheckUidInMsg ; (r16, r18, r19, r20, r21, X)
pop xh
pop xl
pop r16
ret
; @end