⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 intimers.h

📁 时间触发式51单片机嵌入式多任务系统
💻 H
字号:
/*------------------------------------------------------------------*-
 * FILENAME: intimers.c
 *
 * Copyright  2001-2004 By InterNiche Technologies Inc. All rights reserved
 *
 * Handles InterNiche task & application interval timers.
 *
 * MODULE: MISCLIB
 *
 * PORTABLE: yes
-*------------------------------------------------------------------*/
#if _OS_INICHE_TIMERS > 0

#ifndef _INTIMERS_H
#define _INTIMERS_H

/* interval timer structure */
typedef tInData struct 
{
   tByte   Use;
   tByte   Start;
   tByte   Ok;            /* fire interval, in TPS units */
   tWord   Count;         /* ctick to fire */
}tyIntimer;

/* MAX number of interval timers in the system */
#ifndef NUM_INTIMERS        /* Allow override from cfg.h */
#define NUM_INTIMERS        (5)
#endif

extern tyIntimer intimers[NUM_INTIMERS];   /* the timers */
/*---------------------------------------------------------------*/
#define _INTIMER_STOP       1
#define _INTINER_STATUS     1
#define _INTIMER_GETOK      1
#define _INTIMER_KILL       0
#define _INTINER_INIT       1

/* entry points to interval timer package */
tByte  in_timerset(tWord msecs);
void   check_interval_timers(void);
void   in_timerflash(tByte timer, tWord msecs);

#if _INTIMER_STOP > 0
void   in_timerstop(tByte timer);
#endif

#if _INTINER_STATUS > 0
tByte  in_timerstatus(tByte timer);
#endif

#if _INTIMER_GETOK > 0
tByte  in_timerget(tByte timer);
#endif

#if _INTIMER_KILL > 0
tByte  in_timerkill(tByte timer);
#endif

#if _INTINER_INIT > 0
void   in_timerinit(void);
#endif

#endif /* _INTIMERS_H */

#endif

/*------------------------------------------------------------------*-
  ---- END OF FILE -------------------------------------------------
-*------------------------------------------------------------------*/


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -