avr: use NETMSG functions, increase waiting times.

This commit is contained in:
Martin Preuss
2025-03-25 00:38:12 +01:00
parent aee2c384c8
commit cac611deae
4 changed files with 24 additions and 24 deletions

View File

@@ -123,9 +123,9 @@ ioRawSendMsg_attnHigh:
; @clobbers: r16, r17 (r18, r19, r20, r21, r22, X)
ioRawWaitForValidMsg:
ldi r16, 0 ; expect ATTN low
ldi r17, 100
rcall ioWaitForAttnState100ms ; wait for up to 10s
ldi r16, 0 ; expect ATTN low
ldi r17, 200
rcall ioWaitForAttnState100ms ; wait for up to 20s
brcs ioRawWaitForValidMsg_attnLow
ret
ioRawWaitForValidMsg_attnLow:
@@ -137,13 +137,13 @@ ioRawWaitForValidMsg_attnLow:
brcs ioRawWaitForValidMsg_packetReceived
ret
ioRawWaitForValidMsg_packetReceived:
ldi r16, 0xff ; expect ATTN high
ldi r17, 100
rcall ioWaitForAttnState100ms ; wait for up to 10s
ldi r16, 0xff ; expect ATTN high
ldi r17, 200
rcall ioWaitForAttnState100ms ; wait for up to 20s
brcc ioRawWaitForValidMsg_end
ldi xl, LOW(flashRecvBuffer)
ldi xh, HIGH(flashRecvBuffer)
rcall com2CheckMessageInBuffer ; (R16, R17, R18, R19, R20, X)
rcall NETMSG_CheckMessageInBuffer
ioRawWaitForValidMsg_end:
ret
; @end