47 lines
1.3 KiB
NASM
47 lines
1.3 KiB
NASM
; ***************************************************************************
|
|
; copyright : (C) 2026 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. *
|
|
; ***************************************************************************
|
|
|
|
#ifndef AQH_AVR_NETWORK_MSG_REBOOT_R_ASM
|
|
#define AQH_AVR_NETWORK_MSG_REBOOT_R_ASM
|
|
|
|
|
|
; ***************************************************************************
|
|
; 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
|
|
|
|
|
|
#endif
|
|
|