avr: tweaked timing for com2w transport layer.

This commit is contained in:
Martin Preuss
2025-08-19 23:03:15 +02:00
parent 102996f69f
commit fc073696f8
15 changed files with 311 additions and 189 deletions

View File

@@ -29,13 +29,13 @@
com2wnSendMsg:
ldi r20, 6 ; wait for about 60us for clock low
rcall com2wWaitForClockLowMulti10Us ; (R17, R20, R22)
brcs com2wnSendMsg_busy ; CLK got low while waiting, so line is busy
rcall com2wWaitForClockLowMulti10Us ; (R16, R20, R22)
brcs com2wnSendMsg_busy ; CLK got low while waiting, so line is busy
push r15
in r15, SREG
cli ; atomic disable irq and set CLK low
rcall com2wnDisableClkIrq ; (none)
rcall com2wnClkSetLow ; reserve bus (none)
rcall com2wnClkSetLow ; reserve bus (none)
out SREG, r15
pop r15
adiw xh:xl, NETMSG_OFFS_MSGLEN