avr: optimize for space.
This commit is contained in:
@@ -83,11 +83,13 @@ bootLoader:
|
||||
cbi LED_PORT, LED_PINNUM ; on
|
||||
|
||||
rcall flashReadUid
|
||||
sts flashUid, r18
|
||||
sts flashUid+1, r19
|
||||
sts flashUid+2, r20
|
||||
sts flashUid+3, r21
|
||||
|
||||
ldi xh, HIGH(flashUid)
|
||||
ldi xl, LOW(flashUid)
|
||||
st X+, r18
|
||||
st X+, r19
|
||||
st X+, r20
|
||||
st X+, r21
|
||||
|
||||
; wait for 3 secs before doing anything else
|
||||
ldi r16, 30
|
||||
rcall flashWaitForMulti100ms
|
||||
@@ -130,13 +132,13 @@ bootLoader_waitAndRestartBootLoader:
|
||||
; OUT:
|
||||
; - CFLAG: set if incoming flash request received, cleared otherwise
|
||||
; - R16: message type received (if CFLAG set)
|
||||
; REGS: R16, R17, X (R1, R2, R18, R19, R20, R21, R22, R24, R25)
|
||||
; REGS: R16, R17, X, Y, (R1, R2, R18, R19, R20, R21, R22, R24, R25)
|
||||
|
||||
bootCheckFlash:
|
||||
; send flash ready message
|
||||
ldi xl, LOW(flashSendBuffer)
|
||||
ldi xh, HIGH(flashSendBuffer)
|
||||
rcall flashWriteFlashReady ; (R16, R17, R18, R19, R20, Z)
|
||||
rcall flashWriteFlashReady ; (R16, R17, R18, R19, R20, Y, Z)
|
||||
rcall flashSendPacketUntilSuccess ; (R16, R17, R18, R21, R22, R24, R25, X)
|
||||
|
||||
bootCheckFlash_loop:
|
||||
|
||||
Reference in New Issue
Block a user