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

📄 asixapp.h

📁 国家ASIC工程中心使用的嵌入式操作系统
💻 H
字号:
/*************************************************************************
*
* Copyright  2000 National ASIC Center, All right Reserved
*
* FILE NAME:			asixwin.h
* PROGRAMMER:			Lingming
* Date of Creation:		2000/11/30
* 
* DESCRIPTION: 			The essential declarations for ASIX Windows system
*						including MACRO define, global var declaration and
*						public functions prototypes.
*
* NOTE:			 		The application C file MUST include this file if 
*						this application will use ASIX Windows GUI API 
*
* FUNCTIONS LIST:
* fun1(arg1,arg2)		description of func1
* fun2(arg1,arg2,arg3)	description of func2
*
* GLOBAL VARS LIST:
* 
* WindowClass[]			the window class description const table,which
* 						defines the obj's relevent functions pointer
* 
* CurWindow				the pointer that point to the active window
* 
* TaskDescription[]		the table descripts the application relevent
*						information such as app name, stack size ,etc
*						it is also a const table which means the infor
*						in this table will not be changed during running  
* 
* CurTask				the pointer that point to current task 
* 
* TaskHead				the head pointer of the task list
*
**************************************************************************
* MODIFICATION HISTORY
*
* 2000/11/30	by Lingming		Creation of this file
* 2001/11/07	by Lingming 	porting to EPSON C33209 MCU with the soft
*								platform ROS33													
*							
*************************************************************************/


#ifndef _ASIXAPP_H
#define _ASIXAPP_H

/* some system depended const */


/*#define CHINESE_CHAR_HEIGHT	16
#define CHINESE_CHAR_WIDTH		16
#define ENGLISH_CHAR_WIDTH		8
#define ENGLISH_CHAR_HEIGHT		16*/


// follow macro already defined in <asixwin.h>
//#define ASIX_PLCD_W				120//phisical LCD width
//#define ASIX_PLCD_H				160//phisical LCD height

//#define ASIX_STACK_ALARM		400 //if stack mem is lower than this, kill the task

/*
#ifndef	ASIX_ON_PPSM
#define ASIX_ON_PPSM			//ASIX is building on PPSM
#endif
*/

#define ASIX_DEBUG				//Now we are in debugging
//#define ASIX_WITH_UART		//ASIX win will handle the UART
//#define ASIX_DYNAMIC			//supports dynamic load


/*-----------------------------*/


#ifdef 	ASIX_ON_PPSM
#include "ppsm.h"					//PPSM's defines
#include "errors.h"				//PPSM's error defines
#include "proto.h"					//PPSM's function prototype
#else
/* This ppsm.h is the conterpart of Motorola's ppsm.h, we use this 
 * file to covert the ROS33 system layer to a PPSM-like interface
 * so that the porting of ASIX Window will be easer.
 */
#include "ppsm.h"					//include ppsm simulation layer
#endif	//#ifdef 	ASIX_ON_PPSM

#define	ASIX_SERVICE	0x01			//the shell task, there will be only one in the sys 

#define	ASIX_SHELL		0x02			//the shell task, there will be only one in the sys 
#define ASIX_DEAMON		0x03			//the back groud asix win deamon
#define ASIX_APP		0x04			//normal asix win task
#define ASIX_DYNAPP		0x05			//dynamically loaded asix task
#define ASIX_FUNC		0x06			//a function entry(not a task)

#define NOT_IN_ANYGROUP	255	


/* In system, .status has been used to record the task's status. */
/* So such macro defined below may be not used! */
#define ASIX_TASK_CREATE	0x0001
#define ASIX_TASK_RUNNING	0x0002
#define ASIX_TASK_KILLING	0x0004

/*----------Shell Entry---------------------*/
#define MAX_APPENTRY	16
#define MAX_GROUP		12
#define APPENTRY_ICON_H	48
#define APPENTRY_ICON_W	48

typedef struct app_entry
{
	TASKDESCRIPTIONLIST	*tskdes;

} APP_ENTRY;


typedef struct group_description
{
	
	char 		name[9];
	
	
} APP_GROUP	;

extern APP_GROUP		AppGroup[MAX_GROUP];
//extern APP_ENTRY		AppEntry[MAX_GROUP][MAX_APPENTRY];


#define ASIX_SYSDEAMON	0
#define ASIX_SLEEP		1
#define ASIX_DEAMON_NUM	2

// longn_qi 2002/09/10 added
#define RUN_AS_EXISTED_TASK	0x00
#define RUN_AS_NEW_TASK		0x01

extern SYSTCB *ASIXCreateTask ( TASKDESCRIPTION *description );
//extern STATUS ASIXKillTask(SYSTCB *taskptr);
extern STATUS ASIXStartTask( DWORD id );
extern STATUS StartService( TASKDESCRIPTIONLIST *desplst );
extern STATUS EndofTask(void);
extern SYSTCB *TaskLookUp(TASKDESCRIPTION *desptr);
extern STATUS EntryCallBack( U32 prev_taskid);
extern STATUS ExitCallBack ( U32 next_taskid);
extern TASKDESCRIPTIONLIST *TaskRegist(TASKDESCRIPTION *tasktemp);
extern STATUS TaskUnRegist(TASKDESCRIPTIONLIST *taskptr);
extern TASKDESCRIPTIONLIST *IsRegistered( TASKDESCRIPTION *taskdes );

extern DWORD DynAllocateTskID( void );
extern void DynFreeTskID( DWORD id );
extern DWORD GetDynTaskID( TASKDESCRIPTION *taskdes );

extern SYSTCB *GetCurTask(void);
extern U32 GetCurTaskID(void);
extern DWORD CreateDynamicTask ( TASKDESCRIPTION *description, BYTE mode );

extern void AsixShell(void);
extern void SysDeamon(void);
extern void SysSleep(void);
extern void a_task(void);

#endif	//#ifndef _ASIXWIN_H 	

⌨️ 快捷键说明

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