; *************************************************************************** ; 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. * ; *************************************************************************** #ifndef COMMON_UTILS_WAIT_FIXED_H #define COMMON_UTILS_WAIT_FIXED_H .include "common/utils_wait.asm" ; --------------------------------------------------------------------------- ; @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 #endif ; COMMON_UTILS_WAIT_FIXED_H