Files
aqhomecontrol/avr/common/utils_wait_fixed.asm
2024-09-18 00:09:35 +02:00

57 lines
1.4 KiB
NASM

; ***************************************************************************
; copyright : (C) 2023 by Martin Preuss
; email : martin@libchipcard.de
;
; ***************************************************************************
; * This file is part of the project "AqHome". *
; * Please see toplevel file COPYING of that project for license details. *
; ***************************************************************************
; ---------------------------------------------------------------------------
; @routine Utils_WaitFor10MicroSecs @global
;
; wait for 10 microsecs (minus cycles for call and ret).
;
; @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
; ---------------------------------------------------------------------------
; @routine Utils_WaitFor100MicroSecs @global
;
; wait for about 100 microsecs.
;
; @clobbers r22
Utils_WaitFor100MicroSecs:
rcall Utils_WaitFor50MicroSecs
rcall Utils_WaitFor50MicroSecs
ret
; @end