📄 tmt.c
字号:
/* Return the current value of the system clock. */
return(TMD_System_Clock);
}
/*************************************************************************/
/* */
/* FUNCTION */
/* */
/* TMT_Read_Timer */
/* */
/* DESCRIPTION */
/* */
/* This function returns the current value of the count-down timer. */
/* */
/* AUTHOR */
/* */
/* William E. Lamie, Accelerated Technology, Inc. */
/* */
/* CALLED BY */
/* */
/* TMC_Start_Timer Start timer function */
/* */
/* CALLS */
/* */
/* None */
/* */
/* INPUTS */
/* */
/* None */
/* */
/* OUTPUTS */
/* */
/* TMD_Timer Value of count-down timer */
/* */
/* HISTORY */
/* */
/* NAME DATE REMARKS */
/* */
/* W. Lamie xx-xx-199x Created initial version 1.0 */
/* D. Lamie xx-xx-199x Verified version 1.0 */
/* */
/*************************************************************************/
UNSIGNED TMT_Read_Timer(VOID)
{
/* Return the current value of the count-down timer. */
return(TMD_Timer);
}
/*************************************************************************/
/* */
/* FUNCTION */
/* */
/* TMT_Enable_Timer */
/* */
/* DESCRIPTION */
/* */
/* This function enables the count-down timer with the specified */
/* value. */
/* */
/* AUTHOR */
/* */
/* William E. Lamie, Accelerated Technology, Inc. */
/* */
/* CALLED BY */
/* */
/* TMC_Start_Timer Start timer function */
/* TMC_Timer_Task Timer expiration task */
/* */
/* CALLS */
/* */
/* None */
/* */
/* INPUTS */
/* */
/* time New count-down time */
/* */
/* OUTPUTS */
/* */
/* None */
/* */
/* HISTORY */
/* */
/* NAME DATE REMARKS */
/* */
/* W. Lamie xx-xx-199x Created initial version 1.0 */
/* D. Lamie xx-xx-199x Verified version 1.0 */
/* */
/*************************************************************************/
VOID TMT_Enable_Timer(UNSIGNED time)
{
/* Place the new time value into the count-down timer. */
TMD_Timer = time;
/* Indicate that the timer is active. */
TMD_Timer_State = TM_ACTIVE;
}
/*************************************************************************/
/* */
/* FUNCTION */
/* */
/* TMT_Adjust_Timer */
/* */
/* DESCRIPTION */
/* */
/* This function adjusts the count-down timer with the specified */
/* value- if the new value is less than the current. */
/* */
/* AUTHOR */
/* */
/* William E. Lamie, Accelerated Technology, Inc. */
/* */
/* CALLED BY */
/* */
/* TMC_Start_Timer Start timer function */
/* */
/* CALLS */
/* */
/* None */
/* */
/* INPUTS */
/* */
/* time New count-down time */
/* */
/* OUTPUTS */
/* */
/* None */
/* */
/* HISTORY */
/* */
/* NAME DATE REMARKS */
/* */
/* W. Lamie xx-xx-199x Created initial version 1.0 */
/* D. Lamie xx-xx-199x Verified version 1.0 */
/* */
/*************************************************************************/
VOID TMT_Adjust_Timer(UNSIGNED time)
{
/* See if new time value is less than current time value. */
if (time < TMD_Timer)
/* Adjust timer. */
TMD_Timer = time;
}
/*************************************************************************/
/* */
/* FUNCTION */
/* */
/* TMT_Disable_Timer */
/* */
/* DESCRIPTION */
/* */
/* This function disables the count-down timer. */
/* */
/* AUTHOR */
/* */
/* William E. Lamie, Accelerated Technology, Inc. */
/* */
/* CALLED BY */
/* */
/* TMC_Start_Timer Start timer function */
/* TMC_Timer_Task Timer expiration task */
/* */
/* CALLS */
/* */
/* None */
/* */
/* INPUTS */
/* */
/* None */
/* */
/* OUTPUTS */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -