diff --git a/avr/apps/network/main.asm b/avr/apps/network/main.asm index 45dfd2f..a52aa97 100644 --- a/avr/apps/network/main.asm +++ b/avr/apps/network/main.asm @@ -111,8 +111,8 @@ AppNetwork_HandleMsg: sbiw xh:xl, NETMSG_OFFS_CMD cpi r16, NETMSG_CMD_REBOOT_REQUEST breq AppNetwork_HandleMsg_handleRebootMsg - cpi r16, NETMSG_CMD_HAVE_ADDRESS - brcs AppNetwork_HandleMsg_clcRet ; lower than "HAVE_ADDR" + cpi r16, NETMSG_CMD_NEED_ADDRESS + brcs AppNetwork_HandleMsg_clcRet ; lower than "HAVE_NEED" cpi r16, NETMSG_CMD_ADDRESS_RANGE breq AppNetwork_HandleMsg_handleRangeMsg brcc AppNetwork_HandleMsg_clcRet ; higher or equal to "ADDR_RANGE" @@ -122,9 +122,9 @@ AppNetwork_HandleMsg_handleRangeMsg: rjmp AppNetwork_HandleMsg_clcRet AppNetwork_HandleMsg_handleAddrMsg: - rcall NETMSG_Address_Read ; (R18, R19) + rcall NETMSG_Address_Read ; R18=cmd, R19=addr(R18, R19) mov r16, r18 - subi r16, NETMSG_CMD_HAVE_ADDRESS + subi r16, NETMSG_CMD_NEED_ADDRESS ldi zl, LOW(appNetworkMsgTable) ldi zh, HIGH(appNetworkMsgTable) add zl, r16