Replace multiple wait macros with calls (saves 10 bytes).

This commit is contained in:
Martin Preuss
2024-09-01 20:06:05 +02:00
parent 6aac577365
commit 65e60c2dec
2 changed files with 32 additions and 4 deletions

View File

@@ -167,7 +167,7 @@ com2WaitForDataState1ms_loop:
eor r22, r16
andi r22, (1<<COM_PINNUM_DATA)
breq com2WaitForDataState1ms_stateReached
Utils_WaitNanoSecs 10000, 0, r22 ; wait for 10us
rcall com2WaitFor10MicroSecs ; wait for 10us (R22)
dec r17
brne com2WaitForDataState1ms_loop
clc
@@ -195,7 +195,7 @@ com2WaitForAttnState1ms_loop:
eor r22, r16
andi r22, (1<<COM_PINNUM_ATTN)
breq com2WaitForAttnState1ms_stateReached
Utils_WaitNanoSecs 10000, 0, r22 ; wait for 10us
rcall com2WaitFor10MicroSecs ; wait for 10us (R22)
dec r17
brne com2WaitForAttnState1ms_loop
clc
@@ -206,3 +206,17 @@ com2WaitForAttnState1ms_stateReached:
; ---------------------------------------------------------------------------
; wait for 10 microsecs (minus cycles for call and ret).
;
; IN:
; - nothing
; OUT:
; - nothing
; REGS: r22
com2WaitFor10MicroSecs:
Utils_WaitNanoSecs 10000, 3+4, r22 ; wait for 10us (minus RCALL and RET)
ret