avr: send firmware version in FLASH_READY and DEVICE messages.

This commit is contained in:
Martin Preuss
2024-09-05 18:50:43 +02:00
parent cb6e21715a
commit eec544d1b8
2 changed files with 10 additions and 10 deletions

View File

@@ -29,7 +29,7 @@
flashWriteFlashReady:
ldi r16, 0xff
st X+, r16 ; dest address (unused)
ldi r16, 16 ; msg code+src address+14 payload bytes
ldi r16, 20 ; msg code+src address+18 payload bytes
st X+, r16 ; msg len
ldi r16, CPRO_CMD_FLASH_READY
st X+, r16 ; msg code
@@ -42,9 +42,9 @@ flashWriteFlashReady:
ldi r18, 4
rcall Utils_Copy_SDRAM
ldi zl, low(devInfoBlock*2) ; 8 bytes
ldi zl, low(devInfoBlock*2) ; 12 bytes
ldi zh, HIGH(devInfoBlock*2)
ldi r18, 8
ldi r18, 12
rcall Utils_CopyFromFlash
ldi r16, LOW(PAGESIZE*2) ; 2 bytes
@@ -52,9 +52,9 @@ flashWriteFlashReady:
ldi r16, HIGH(PAGESIZE*2)
st X+, r16
sbiw xh:xl, 18 ; go back to beginning of message
sbiw xh:xl, 22 ; go back to beginning of message
rcall com2CalcAndAddChecksumByte ; (R16, R17, R18, R19, R20, X)
sbiw xh:xl, 19 ; go back to beginning of message
sbiw xh:xl, 23 ; go back to beginning of message
ret