📄 usertimer.h
字号:
/********************************************************
*
* File: GsmTimer.h
*
* Description:
* This file contains definitions of constants and message
* structures used in Timer Management module .
*
* Author:
* Weiming Zhang
*
* Create Date: Feb 2,2002
* Complete Date: Feb 23,2002
*
********************************************************/
#ifndef _GSMTIMER_
#define _GSMTIMER_
#include "ComStruct.h"
//#define TIMER_SEM 0x11111 /* Timer Interrupt Handler uses it to notify the TimerManager task. */
#define TASK_TIMER_PRIO 0
#define MAXIUT 32 /* max-number of timers that can be started at the same time. */
//#define MAXPRO 8 /* max-number of special timers (restart automatically) */
//#define TimerProc_module 0x04 /* Timer Manager Module ID */
//#define Timer_Start 0x90 /* Start Timer */
//#define Timer_Stop 0x91 /* Stop Timer */
//#define Timer_TimeOut 0x92 /* Timer expired */
//typedef rom struct{
// unsigned char Len;
// unsigned char Src;
// unsigned char Des;
// unsigned char MID;
// unsigned short TID; /* TID[0] should be 0x00 or 0x80, TID[1] is the real Timer-ID */
// unsigned short Val;
//}TIMER_MESSAGE;
typedef rom struct{
MSG_HEAD Head;
unsigned short TID; /* TID[0] should be 0x00 or 0x80, TID[1] is the real Timer-ID */
unsigned short Val;
}TIMER_MESSAGE;
typedef rom struct IutStruct{
unsigned short interval;
unsigned short initcnt;
OS_EVENT rom * Origin; //Originator, actually it's the message queue of the originator
// unsigned char source;
unsigned short type;
rom struct IutStruct *next;
}IUT;
//typedef struct TimerProStruct{
// unsigned short interval;
// unsigned char source; /* if source==0, then it is free */
// unsigned short type;
//}TIMERPRO;
//#ifndef NULL
// #define NULL (IUT rom *)0
//#endif
#endif
void TimerManager(OS_EVENT *peventTimer);
extern void TimerMgtInit(void);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -