flash: reduced waiting times.
This commit is contained in:
@@ -83,13 +83,15 @@ flashProcess_loop1:
|
||||
ldi r16, NETMSG_CMD_FLASH_DATA
|
||||
ldi r20, FLASH_WAITFORDATA_TRIES
|
||||
rcall ioWaitForGivenMsg ; (r16, r17, r18, r19, r20, r22, X)
|
||||
brcc flashProcess_end ; no FLASH_DATA or FLASH_END msg
|
||||
; brcc flashProcess_end ; no FLASH_DATA or FLASH_END msg
|
||||
brcc flashProcess_loop1end ; no FLASH_DATA or FLASH_END msg, retry indefinately
|
||||
; either FLASH_DATA or FLASH_END received
|
||||
ldi xl, LOW(flashRecvBuffer)
|
||||
ldi xh, HIGH(flashRecvBuffer)
|
||||
cpi r16, NETMSG_CMD_FLASH_DATA ; not FLASH_DATA, flashing ended/aborted
|
||||
brne flashProcess_endReceived ; FLASH_END received, done
|
||||
rcall flashProcessHandleFlashData ; (R0, R1, R15, R16, R17, R18, R19, R20, R22, R24, Z)
|
||||
flashProcess_loop1end:
|
||||
rjmp flashProcess_loop1
|
||||
flashProcess_endReceived:
|
||||
rcall flashProcessHandleFlashEnd
|
||||
@@ -180,16 +182,16 @@ flashProcessHandleFlashData_sendResponse:
|
||||
#if 0
|
||||
push r16
|
||||
; send flash message back (debugging)
|
||||
ldi r24, 50
|
||||
rcall flashWaitForMillisecs ; (R22, R24)
|
||||
; ldi r24, 2
|
||||
; rcall flashWaitForMillisecs ; (R22, R24)
|
||||
ldi xl, LOW(flashRecvBuffer)
|
||||
ldi xh, HIGH(flashRecvBuffer)
|
||||
rcall ioRawSendPacket ; (r16, r17, X)
|
||||
pop r16
|
||||
#endif
|
||||
|
||||
ldi r24, 25
|
||||
rcall flashWaitForMillisecs ; (R22, R24)
|
||||
; ldi r24, 2
|
||||
; rcall flashWaitForMillisecs ; (R22, R24)
|
||||
rcall flashProcessSendFlashResponse ; (R16, R17, R18, R19, R20, X)
|
||||
sbi LED_PIN, LED_PINNUM ; toggle
|
||||
sec
|
||||
|
||||
Reference in New Issue
Block a user