avr: fully implemented router functionality in network and router app.
This commit is contained in:
38
avr/modules/network/msg/range-r.asm
Normal file
38
avr/modules/network/msg/range-r.asm
Normal file
@@ -0,0 +1,38 @@
|
||||
; ***************************************************************************
|
||||
; 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_RangeRead @global
|
||||
; Read a RANGE message.
|
||||
;
|
||||
; @param X buffer to read from
|
||||
; @return R18 command
|
||||
; @return R20 range begin
|
||||
; @return R21 range end
|
||||
; @clobbers none
|
||||
|
||||
NETMSG_Range_Read:
|
||||
adiw xh:xl, NETMSG_OFFS_CMD
|
||||
ld r18, X ; command
|
||||
adiw xh:xl, NETMSG_RANGE_OFFS_FROM-NETMSG_OFFS_CMD ; skip src addr and uid
|
||||
ld r20, X+ ; range from
|
||||
ld r21, X ; range to
|
||||
sbiw xh:xl, NETMSG_RANGE_OFFS_TO ; back to msg begin
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user