?? mk_timer.h
字號:
/**********************************************************************************
* mk_timer.h
* coded by hspark@ce.cnu.ac.kr
* date : 2002/06/23
**********************************************************************************/
#ifndef __MK_TIMER_H__
#define __MK_TIMER_H__
#include "kernel\\mk_sys.h"
#include "kernel\\mk_ddi.h"
#define MK_TIMER_MAGIC 0xF3CD03E9L /* Magic Value of Timer */
#define MK_TIMER_DISABLE 0
#define MK_TIMER_ENABLE 1
typedef void(*MK_TIMER_FUNC_T)(ULONG);
#pragma packed on
typedef struct mk_timer_struct {
ULONG tm_Magic;
LONG tm_Expirations; //number of expiration
ULONG tm_InitialTime; //initial time of timer
ULONG tm_ExpireTime; //time to expire
ULONG tm_RepeateTime; //repeate time of timer
LONG tm_Arg1;
char *tm_Arg2;
CHAR *tm_pName;
MK_TIMER_FUNC_T tm_Function;
BOOLEAN tm_Status;
struct mk_timer_struct *tm_pActivedNext;
struct mk_timer_struct *tm_pActivedPrev;
struct mk_timer_struct *tm_pNext;
struct mk_timer_struct *tm_pPrev;
} MK_TIMER;
#pragma packed off
extern MK_TIMER *MK_pTimerActiveListHead;
extern MK_TIMER *MK_pTimerListHead;
extern MK_TIMER *MK_pTimerListTail;
void MK_SystemTimerInitialize(void);
STATUS MK_CreateTimer(MK_TIMER *pTimer, CHAR *pName, MK_TIMER_FUNC_T Function, INT Arg1, CHAR *Arg2,
ULONG InitialTime, ULONG RepeateTime, BOOLEAN Enable);
ULONG MK_GetTimerRepeateTime(MK_TIMER *pTimer);
ULONG MK_SetTimerRepeateTime(MK_TIMER *pTimer, ULONG NewTime);
BOOLEAN MK_GetTimerStatus(MK_TIMER *pTimer);
STATUS MK_ControlTimer(MK_TIMER *pTimer, BOOLEAN Enable);
STATUS MK_DeleteTimer(MK_TIMER *pTimer);
STATUS MK_GetRemainingTime( MK_TIMER *pTimer, ULONG *remainTime);
STATUS MK_ResetTimer(MK_TIMER *pTimer, void(*timer_entry)(ULONG),
ULONG InitialTime, ULONG RepeatTime, BOOLEAN Enable);
ULONG MK_GetSystemClock(void);
void MK_SetSystemClock(ULONG newTicks);
STATUS MK_TimerInformation(struct mk_ddi_struct *pDDI);
VOID MK_TimeTick(INT id);
VOID MK_Timer0Initialize(VOID);
#endif /* __MK_TIMER_H__ */
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -