introduce macros bigjmp and bigcall for intermodule calls/jmps
translates to rjmp/rcall on MCUs with up to 8K flash and to jmp/call on others.
This commit is contained in:
@@ -29,7 +29,7 @@ NETMSG_Device_Write:
|
||||
ldi zh, HIGH(devInfoBlock*2) ; 6-17: devInfoBlock
|
||||
ldi zl, LOW(devInfoBlock*2)
|
||||
ldi r18, 12
|
||||
rcall Utils_CopyFromFlash ; (R17, R18, X, Z)
|
||||
bigcall Utils_CopyFromFlash ; (R17, R18, X, Z)
|
||||
sbiw xh:xl, 20 ; go back to beginning of message (1 byte dst addr, 1 byte length, 18 bytes payload)
|
||||
rcall NETMSG_CalcAndAddChecksumByte ; (R16, R17, R18, R19, R20, X)
|
||||
sbiw xh:xl, 21 ; go back to beginning of message (1 byte dst addr, 1 byte length, 18 bytes payload, 1 byte crc)
|
||||
|
||||
@@ -28,7 +28,7 @@ NETMSG_RecvStats_Write:
|
||||
rcall NETMSG_Common_AddUidToBuffer ; (R16, R18, R19, R20, R21)
|
||||
adiw yh:yl, NET_IFACE_OFFS_PACKETSIN_LOW
|
||||
ldi r18, 12
|
||||
rcall Utils_Copy_SDRAM ; (R17, R18, X, Y)
|
||||
bigcall Utils_Copy_SDRAM ; (R17, R18, X, Y)
|
||||
sbiw yh:yl, NET_IFACE_OFFS_PACKETSIN_LOW+12
|
||||
|
||||
sbiw xh:xl, 20 ; go back to beginning of message (1 byte dst addr, 1 byte length, 18 bytes payload)
|
||||
|
||||
@@ -28,7 +28,7 @@ NETMSG_SendStats_Write:
|
||||
rcall NETMSG_Common_AddUidToBuffer ; (R16, R18, R19, R20, R21)
|
||||
adiw yh:yl, NET_IFACE_OFFS_PACKETSOUT_LOW
|
||||
ldi r18, 6
|
||||
rcall Utils_Copy_SDRAM ; (R17, R18, X, Y)
|
||||
bigcall Utils_Copy_SDRAM ; (R17, R18, X, Y)
|
||||
sbiw yh:yl, NET_IFACE_OFFS_PACKETSOUT_LOW+6
|
||||
|
||||
sbiw xh:xl, 14 ; go back to beginning of message (1 byte dst addr, 1 byte length, 12 bytes payload)
|
||||
|
||||
Reference in New Issue
Block a user