avr: added routine com2WaitForDataState1ms (not yet used).
This commit is contained in:
@@ -185,10 +185,40 @@ com2WaitForAttnHigh_done:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; comWaitFor100ns
|
; com2WaitForDataState1ms
|
||||||
;
|
;
|
||||||
; Waits for 100 nanoseconds.
|
; Waits up to COM2_MAXWAIT_US loops for high ATTN line
|
||||||
|
; IN:
|
||||||
|
; OUT:
|
||||||
|
; - CFLAG: set if state reached, cleared otherwise
|
||||||
|
; REGS: R24 (R22)
|
||||||
|
|
||||||
|
com2WaitForDataState1ms:
|
||||||
|
ldi r24, 100
|
||||||
|
com2WaitForDataState1ms_loop:
|
||||||
|
push r17
|
||||||
|
in r17, COM_PIN_DATA
|
||||||
|
eor r17, r16
|
||||||
|
andi r17, (1<<COM_PINNUM_DATA)
|
||||||
|
pop r17
|
||||||
|
breq com2WaitForDataState1ms_stateReached
|
||||||
|
Utils_WaitNanoSecs 10000, 0, r22 ; wait for 10us
|
||||||
|
dec r24
|
||||||
|
brne com2WaitForDataState1ms_loop
|
||||||
|
clc
|
||||||
|
ret
|
||||||
|
com2WaitForDataState1ms_stateReached:
|
||||||
|
sec
|
||||||
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; ---------------------------------------------------------------------------
|
||||||
|
; comWaitFor1000ns
|
||||||
|
;
|
||||||
|
; Waits for 1000 nanoseconds.
|
||||||
; IN:
|
; IN:
|
||||||
; OUT:
|
; OUT:
|
||||||
; - CFLAG: set if okay, clear otherwise
|
; - CFLAG: set if okay, clear otherwise
|
||||||
|
|||||||
Reference in New Issue
Block a user