added com2w0

This commit is contained in:
Martin Preuss
2025-07-19 15:02:31 +02:00
parent 323a5b76be
commit 59a0962420
3 changed files with 651 additions and 11 deletions

View File

@@ -98,10 +98,6 @@ COM2W_Every100ms:
; @clobbers R16, R17, R18, R19, R20, R22, R24, R25, X
com2wReceiveNextPkg:
; ldi r20, 3 ; make sure clock remains low for at least 15us
; rcall com2wWaitForClockHighMulti5Us ; (R20, R22)
; brcs com2wReceiveNextPkg_end ; clock got high quite soon, maybe just flaky line
rcall NET_Buffer_Alloc ; R16=buffer num (R16, R17, X)
brcs com2wReceiveNextPkg_gotBuffer
ldi r16, NET_IFACE_OFFS_ERR_NOBUF_LOW
@@ -119,13 +115,6 @@ com2wReceiveNextPkg_gotBuffer:
rcall NET_AddIncomingMsgNum ; (R17, R18, X)
brcs com2wReceiveNextPkg_end
; debug
push r18
push r19
rcall LedSimple_SetFastTiming
pop r19
pop r18
push r16
ldi r16, NET_IFACE_OFFS_ERR_MISSED_LOW
rcall NET_Interface_IncCounter16 ; (R24, R25)