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

📄 usertimer.h

📁 本人编写的无线电话程序,给予PIC18C801设计,包括了uCOS的移植以及菜单,自己设计的拼音注入法,完整地一级汉字库,希望对大家有所帮助
💻 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 + -