📄 cxtwatm.c
字号:
/*********************************************************
Copyright (c) CMX Company. 1999. All rights reserved
*********************************************************/
/* version 5.30 */
#define CMXMODULE 1
#include <cxfuncs.h> /* get cmx include header file */
#include <cxextern.h> /* get cmx include header file */
#if (defined(CMXTRACKER) || defined(WINTRACKER))
#include <cmxtrack.h> /* get cmx include header file */
#endif
/************************************************************
This function allows a task to wait for the desired time
period to expire or indefinitely. The K_Task_Wake and K_Task_Wake_Force
function may be used to wake this task, prior to the time
period expiring.
************************************************************/
byte K_Task_Wait(word16 timecnt)
{
K_I_Disable_Sched(); /* set task block */
#if (defined(CMXTRACKER) || defined(WINTRACKER))
if (CMXTRACKER_ON)
{
cmxtracker_in4(CXTWATM_CALL,0,timecnt);
}
#endif
/* call the function that will suspend this task, indicate the
reason to suspend this task */
if (K_I_Time_Common(timecnt,WAIT))
{
#if (defined(CMXTRACKER) || defined(WINTRACKER))
if (CMXTRACKER_ON)
{
cmxtracker_in1(CXTWATM_DELAY_K_ERROR);
}
#endif
return(K_TIMEOUT);
}
else
{
#if (defined(CMXTRACKER) || defined(WINTRACKER))
if (CMXTRACKER_ON)
{
cmxtracker_in1(CXTWATM_DELAY_K_OK);
}
#endif
return(K_OK);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -