📄 power.h
字号:
//----------------------------------------------------------------------------------------------------
// ID Code : Power.h No.0000
// Update Note :
//
//----------------------------------------------------------------------------------------------------
//--------------------------------------------------
// Definitions of
//--------------------------------------------------
//----------------------------------------------------------------------------------------------------
#ifdef __POWER__
//--------------------------------------------------
// Global Variables
//--------------------------------------------------
BYTE idata ucPowerControl;
//--------------------------------------------------
// Function Prototypes
//--------------------------------------------------
bit CPowerHandler(void);
void CPowerControl(void);
void CPowerPanelOn(void);
void CPowerPanelOff(void);
void CPowerPanelPowerOn(void);
void CPowerPanelPowerOff(void);
void CPowerLightPowerOn(void);
void CPowerLightPowerOff(void);
void CPowerDisplayPortOn(void);
void CPowerDisplayPortOff(void);
void CPowerLVDSOn(void);
void CPowerLVDSOff(void);
void CPowerRSDSOn(void);
void CPowerRSDSOff(void);
void CPowerADCAPLLOn(void);
void CPowerADCAPLLOff(void);
void CPowerTMDSOn(void);
void CPowerTMDSOff(void);
void CPowerDPLLOff(void);
/**********TCON*******************/
// add by cooriee 050521 for TCON
void CPowerTCONOn(void);
void CPowerTCONOff(void);
/**********TCON*******************/
#else
//--------------------------------------------------
// Extern Global Variables
//--------------------------------------------------
extern BYTE idata ucPowerControl;
//--------------------------------------------------
// Extern Function Prototypes
//--------------------------------------------------
extern bit CPowerHandler(void);
extern void CPowerControl(void);
extern void CPowerPanelOn(void);
extern void CPowerPanelOff(void);
extern void CPowerPanelPowerOn(void);
extern void CPowerPanelPowerOff(void);
extern void CPowerLightPowerOn(void);
extern void CPowerLightPowerOff(void);
extern void CPowerLVDSOn(void);
extern void CPowerLVDSOff(void);
extern void CPowerRSDSOn(void);
extern void CPowerRSDSOff(void);
extern void CPowerADCAPLLOn(void);
extern void CPowerADCAPLLOff(void);
extern void CPowerTMDSOn(void);
extern void CPowerTMDSOff(void);
extern void CPowerDPLLOff(void);
/**********TCON*******************/
// add by cooriee 050521 for TCON
extern void CPowerTCONOn(void);
extern void CPowerTCONOff(void);
/**********TCON*******************/
#endif
//----------------------------------------------------------------------------------------------------
//--------------------------------------------------
// Macro of Power Status
//--------------------------------------------------
#define GET_POWERSTATUS() ((bit)(stSystemData.MonitorFlag & _BIT7))
#define SET_POWERSTATUS() (stSystemData.MonitorFlag |= _BIT7) // Power Up
#define CLR_POWERSTATUS() (stSystemData.MonitorFlag &= ~_BIT7) // Power Down
//--------------------------------------------------
// Macro of Power Switch Flag
//--------------------------------------------------
#define GET_POWERSWITCH() ((bit)(ucPowerControl & _BIT0))
#define SET_POWERSWITCH() (ucPowerControl |= _BIT0)
#define CLR_POWERSWITCH() (ucPowerControl &= ~_BIT0)
//--------------------------------------------------
// Macro of Panel Power Status
//--------------------------------------------------
#define GET_PANELPOWERSTATUS() ((bit)(ucPowerControl & _BIT1))
#define SET_PANELPOWERSTATUS() (ucPowerControl |= _BIT1) // Power Up
#define CLR_PANELPOWERSTATUS() (ucPowerControl &= ~_BIT1) // Power Down
//--------------------------------------------------
// Macro of Backlight Power Status
//--------------------------------------------------
#define GET_LIGHTPOWERSTATUS() ((bit)(ucPowerControl & _BIT2))
#define SET_LIGHTPOWERSTATUS() (ucPowerControl |= _BIT2)
#define CLR_LIGHTPOWERSTATUS() (ucPowerControl &= ~_BIT2)
//--------------------------------------------------
// Macro of Load Font at First Power Up
//--------------------------------------------------
#define GET_FIRST_LOADFONT() ((bit)(ucPowerControl & _BIT3))
#define SET_FIRST_LOADFONT() (ucPowerControl |= _BIT3)
#define CLR_FIRST_LOADFONT() (ucPowerControl &= ~_BIT3)
//--------------------------------------------------
// Macro of
//--------------------------------------------------
#define GET_PRE_VGA_CONNECT() ((bit)(ucPowerControl & _BIT4))
#define SET_PRE_VGA_CONNECT(x) (ucPowerControl = (ucPowerControl & ~_BIT4) | ((BYTE)x << 4))
//--------------------------------------------------
// Macro of
//--------------------------------------------------
#define GET_PRE_DVI_CONNECT() ((bit)(ucPowerControl & _BIT5))
#define SET_PRE_DVI_CONNECT(x) (ucPowerControl = (ucPowerControl & ~_BIT5) | ((BYTE)x << 5))
//--------------------------------------------------
// Macro of Panel Power Up/Down
//--------------------------------------------------
#define PANELPOWER_UP() (bPANELPOWER = _PANEL_ON)
#define PANELPOWER_DOWN() (bPANELPOWER = _PANEL_OFF)
// EVAN 050512 for 12v power
#if(_POWER12VUSE == _ON) // evan 050512
#define PANELPOWER_UP12V() (bPANELPOWER12V = _PANEL_ON)
#define PANELPOWER_DOWN12V() (bPANELPOWER12V = _PANEL_OFF)
#endif
//--------------------------------------------------
// Macro of Light Power Up/Down
//--------------------------------------------------
#if (_PCB_TYPE==_PCB_PV023BC1||_PCB_TYPE==_PCB_JIALUHUA)
#define LIGHTPOWER_UP() {}
#define LIGHTPOWER_DOWN() {}
#else
#define LIGHTPOWER_UP() (bLIGHTPOWER = _LIGHT_ON)
#define LIGHTPOWER_DOWN() (bLIGHTPOWER = _LIGHT_OFF)
#endif
//--------------------------------------------------
// In some case, 12V may alway available, we need to
// use macro of Light Power Enable or Disable:
// use 1 transistor: 0-enable, 1-disable
// use 2 transistor: 0-disable, 1-enable
//--------------------------------------------------
#if (_PCB_TYPE == _PCB_RIGHTECH_A)
#define LIGHT_ENABLE() (bLIGHT_ENABLE = _LIGHT_ENABLE)
#define LIGHT_DISABLE() (bLIGHT_ENABLE = _LIGHT_DISABLE)
#elif (_PCB_TYPE==_PCB_PV023BC1||_PCB_TYPE==_PCB_JIALUHUA)
#define LIGHT_ENABLE() (bLIGHT_ENABLE = _LIGHT_ENABLE)
#define LIGHT_DISABLE() (bLIGHT_ENABLE = _LIGHT_DISABLE)
#endif
//x.hu
#define GET_MUTESTATUS() ((stAudioData.audioFlag&_BIT7)?1:0)
#define SET_MUTESTATUS() (stAudioData.audioFlag |= _BIT7)
#define CLR_MUTESTATUS() (stAudioData.audioFlag &= (~_BIT7))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -