avr: "Utils_WaitNanoSecs 100000" doesn't work at 8MHz (too many cycles).
This commit is contained in:
@@ -11,14 +11,28 @@
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Utils_WaitFor10MicroSecs @global
|
||||
;
|
||||
; wait for 10 microsecs (minus cycles for call and ret).
|
||||
;
|
||||
; IN:
|
||||
; - nothing
|
||||
; OUT:
|
||||
; - nothing
|
||||
; REGS: r22
|
||||
; @clobbers r22
|
||||
|
||||
Utils_WaitFor10MicroSecs:
|
||||
Utils_WaitNanoSecs 10000, 7, r22 ; wait for 10us (minus RCALL and RET)
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Utils_WaitFor50MicroSecs @global
|
||||
;
|
||||
; wait for 50 microsecs (minus cycles for call and ret).
|
||||
;
|
||||
; @clobbers r22
|
||||
|
||||
Utils_WaitFor50MicroSecs:
|
||||
Utils_WaitNanoSecs 50000, 7, r22 ; wait for 50us (minus RCALL and RET)
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user