📄 pnlmacro.h
字号:
/********************************************************************
* Copyright (C) 1999 Acer Labs, Inc. All Rights Reserved. *
* *
* File: pnlmacro.h *
* *
* Contents: Front Panel Control Macro *
* *
* History: *
* Date By Reason *
* =========== ======== ====== *
* 25-Nov-1999 WuCC Create *
********************************************************************/
/*------------------------------------------------------\
| Grid Table Operation : |
| The purpose of these operations are letting |
| the program more readable. |
\------------------------------------------------------*/
#define PnlLightTableOn(grid, mask) PnlLightTable[grid] |= mask
#define PnlLightTableOff(grid, mask) PnlLightTable[grid] &= ~(mask)
#define PnlLBNorTableOn(grid, mask) PnlLBNorTable[grid] &= ~(mask)
#define PnlLBNorTableOff(grid, mask) PnlLBNorTable[grid] |= mask
#define PnlBlinkTableUpdate(grid) PnlBlinkTable[grid] = PnlLightTable[grid] & PnlLBNorTable[grid]
/*------------------------------------------------------\
| Module Macro Interface : |
| The purpose of those Module Macro Interfaces |
| are linking component and module function. |
\------------------------------------------------------*/
/*------------------*/
/* SIGNAL INTERFACE */
/*------------------*/
#define SIGNAL_FUNCTION(name, mSig, mAttr, nSig) void \
name(DWORD hSig) \
{ \
static DWORD pSig = PNL_HSIG_OFF; \
\
PnlModuleSignal(hSig, pSig, (PNL_POS_TYPE **)mSig, (DWORD *)mAttr, nSig); \
pSig = hSig; \
}
/*------------------*/
/* MSGSIG INTERFACE */
/*------------------*/
#define MSG_SIG_FUNCTION(name, posMsg, posSig) void \
name(DWORD value) \
{ \
PnlModuleMsgSig(value, (PNL_POS_TYPE *)posMsg, (PNL_POS_TYPE *)posSig); \
}
/*------------------*/
/* MSGSIG INTERFACE */
/*------------------*/
#define DGT_SIG_FUNCTION(name, posMsg, posSig) void \
name(DWORD value) \
{ \
PnlModuleDgtSig(value, (PNL_POS_TYPE *)posMsg, (PNL_POS_TYPE *)posSig); \
}
/*----------------*/
/* TIME INTERFACE */
/*----------------*/
#define TIME_FUNCTION(name, posHour, posMin, posSec, posSig) void \
name(DWORD hour, DWORD min, DWORD sec) \
{ \
PnlModuleTime(hour, min, sec, (PNL_POS_TYPE *)posHour, (PNL_POS_TYPE *)posMin, (PNL_POS_TYPE *)posSec, (PNL_POS_TYPE *)posSig); \
}
/*-------------------*/
/* MESSAGE INTERFACE */
/*-------------------*/
#if(_CUSTOM == CYBERHOME)
#define MESSAGE_FUNCTION(name, mMsg, mAttr, nMsg, lMsg, posMsg,posMsg2) void \
name(DWORD hMsg) \
{ \
PnlModuleMessage(hMsg, (PNL_MSG_TYPE *)mMsg, (DWORD *)mAttr, nMsg, lMsg, (PNL_POS_TYPE *)posMsg,(PNL_POS_TYPE *)posMsg2); \
}
#else
#define MESSAGE_FUNCTION(name, mMsg, mAttr, nMsg, lMsg, posMsg) void \
name(DWORD hMsg) \
{ \
PnlModuleMessage(hMsg, (PNL_MSG_TYPE *)mMsg, (DWORD *)mAttr, nMsg, lMsg, (PNL_POS_TYPE *)posMsg); \
}
#endif
/*---------------------*/
/* LIGHTDISC INTERFACE */
/*---------------------*/
#define LIGHTDISC_FUNCTION(name, posLDSegment, posLDSig) DWORD \
PnlLDNum = sizeof(posLDSegment)/sizeof(PNL_POS_TYPE)-1; \
DWORD PnlLDSpeedCount = PNL_CLK_LD_SPEED_OFF; \
DWORD PnlLDDir = PNL_DIRECT_FORWARD; \
PNL_POS_TYPE *PnlLDSegment = posLDSegment; \
PNL_POS_TYPE *PnlLDSig = posLDSig; \
void name(DWORD attr) \
{ \
PnlModuleLightDisc(&PnlLDSpeedCount, \
&PnlLDDir, \
PnlLDSegment, \
PnlLDSig, \
attr); \
}
/*------------------*/
/* DGTMSG INTERFACE */
/*------------------*/
#define DGTMSG_FUNCTION(name, nTotal, nOrder, posDgt, posMsg, posSig) void \
name(DWORD value) \
{ \
PnlModuleDigitalMsg(value, nTotal, nOrder, posDgt, posMsg, posSig); \
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -