enable sending messages.

This commit is contained in:
Martin Preuss
2025-07-19 17:08:19 +02:00
parent e8423ae97f
commit ae1853ba62

View File

@@ -306,7 +306,7 @@ com2w0WaitForClockLowMulti5Us_stateReached:
com2w0SendMsg: com2w0SendMsg:
ldi r20, 11 ; wait for about 55us for clock low ldi r20, 11 ; wait for about 55us for clock low
rcall com2w0WaitForClockLowMulti5Us rcall com2w0WaitForClockLowMulti5Us ; (R20, R22)
brcs com2w0SendMsg_busy ; CLK got low while waiting, so line is busy brcs com2w0SendMsg_busy ; CLK got low while waiting, so line is busy
push r15 push r15
in r15, SREG in r15, SREG
@@ -443,7 +443,7 @@ com2w0ModeJumpTable:
; @clobbers R16, R17, R22, R24, R25, X ; @clobbers R16, R17, R22, R24, R25, X
com2w0RunIdle: com2w0RunIdle:
rjmp com2w0RunIdle_end ; DEBUG ;rjmp com2w0RunIdle_end ; DEBUG
push r15 push r15
in r15, SREG in r15, SREG
cli cli
@@ -468,7 +468,7 @@ com2w0RunIdle_haveMsg:
adiw xh:xl, 1 adiw xh:xl, 1
rcall com2w0SendMsg ; (R16, R17, R22, R24, R25, X) rcall com2w0SendMsg ; (R16, R17, R22, R24, R25, X)
push r15 push r15
inr r15, SREG ; save SREG (no CLI, we want to save CFLAG only) in r15, SREG ; save SREG (no CLI, we want to save CFLAG only)
ldi r16, COM2W_MODE_IDLE ldi r16, COM2W_MODE_IDLE
rcall com2wSetMode ; (R17) rcall com2wSetMode ; (R17)
out SREG, r15 ; restore SREG out SREG, r15 ; restore SREG