📄 internal.h
字号:
//------------------------------------------------------------------------------
// File: hInternal.h
// Date: 2001-6-18 pm 05:22:43
// Written by: CYu
// Decription:
// Modification record
//------------------------------------------------------------------------------
// Copyright: EPSON Proprietary Material
// Copyright (c) 2001, All Rights Reserved
// SHANGHAI EPSON ELECTRONICS CO., LTD.
//
// DISTRIBUTION PROHIBITED without written authorization from EPSON
//------------------------------------------------------------------------------
#include <windows.h>
#include <kernel\ros33\itron.h>
#if !defined _H_INTERNAL_H_
#define _H_INTERNAL_H_
#define KR_REPEATSTART 30
#define KR_INTERVAL 5
typedef struct tagTCB
{
ID idNextTask;
ID idPrevTask;
FP fpPC;
UINT* pFlgptn;
T_MSG** pMsg;
UH uhWupcnt;
B bPriority;
B bIniPriority;
UB ubStatus;
UH ubWaitStat;
VW vwWaitRet;
int nThread;
void* hThread;
} TCB, *PTCB;
typedef struct tagREADYQUEUE
{
ID idFirstTask;
ID idLastTask;
} READYQUEUE, *PREADYQUEUE;
typedef struct tagFCB
{
ID idTask;
UH uhFlgPtn;
UH uhWaiPtn;
B bWaiMode;
} FCB, *PFCB;
typedef struct tagSMPHCB
{
ID idTask;
UH ubSmphCnt;
UH ubSmphMax;
} SMPHCB, *PSMPHCB;
typedef struct tagMXCB
{
ID idTask;
T_MSG *pMsg;
} MXCB, *PMXCB;
typedef union tagINTMSG
{
struct
{
unsigned short uMsg;
unsigned short ux;
unsigned short uy;
} ePen;
struct
{
unsigned short uMsg;
unsigned short uKeyCode;
} eKey;
struct
{
unsigned short uMsg;
unsigned short uId;
} eTim;
} INTMSG, *PINTMSG;
#if defined __cplusplus
extern "C"
{
#endif
__declspec( dllimport ) HWND hwndClient;
extern CRITICAL_SECTION CriticalSection;
extern HANDLE hEnEventInt;
#define ENTER_CS \
EnterCriticalSection(&CriticalSection);
#define LEAVE_CS \
LeaveCriticalSection(&CriticalSection);
extern READYQUEUE aReadyQueue[MAX_TSKPRI+1];
extern TCB aTcb[TSK_NUM+1];
extern FCB aFcb[FLG_NUM+1];
extern MXCB aMxcb[MLBX_NUM+1];
extern SMPHCB aSmphcb[SMPH_NUM+1];
extern ID idCurTask;
extern UB g_ubSysStat;
extern UB g_ubIntNestCnt;
extern BOOL isSystemStart;
extern void AppendTaskToReadyQueue( ID tskid );
extern ID RemoveFirstTaskFromReadyQueue( B bPriority );
extern void RemoveTaskFromReadyQueue( B bPriority, ID idTsk );
extern ER ContextSwitch( void );
//extern void AppendDebugLogString( char *pText, FILE *file );
//extern void DisplayReadyTask( void );
//extern void AddPollingTimer( UINT uPeriod );
extern void PollingTimerHandler( HWND hwnd, UINT uMSG, UINT idTask, DWORD dwTime );
extern unsigned char CheckKey( void );
extern void SetTimerForKeyboard( int nMs );
#if defined __cplusplus
}
#endif
#endif
//----------------------------- The End of the File ----------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -