avr: fully implemented router functionality in network and router app.

This commit is contained in:
Martin Preuss
2025-07-07 16:05:53 +02:00
parent 691ee3c71b
commit cbd498150f
21 changed files with 769 additions and 66 deletions

View 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