📄 struct.h
字号:
//----------------------------------------------------------------------------------------------------
// ID Code : Struct.h No.0000
// Update Note :
//
//----------------------------------------------------------------------------------------------------
#include "Core\Header\Maindef.h"
#define _SET_INPUT_SOURCE(value) (stSystemData.InputSource = value)
#define _GET_INPUT_SOURCE() stSystemData.InputSource
#define _GET_BLUE_BACKGROUND() ((stSystemData.MonitorFlag & _BIT5) >> 5)
#define _SET_BLUE_BACKGROUND(x) stSystemData.MonitorFlag = (stSystemData.MonitorFlag & (~_BIT5)) | (x << 5)
#define _BURNIN_ON _BIT2
#define _BURNIN_OFF 0x00
#define GET_BURNIN_STATE() (stSystemData.MonitorFlag & _BIT2)
#define SET_BURNIN_STATE(x) stSystemData.MonitorFlag = (stSystemData.MonitorFlag & (~_BIT2)) | (x << 2)
#define _DISPMODE_FULL 0
#define _DISPMODE_43 1
#define _DISPMODE_AUTO 2
#define GET_DISPLAYMODE() (stSystemData.MonitorFlag & 0x03)
#define SET_DISPLAYMODE(x) stSystemData.MonitorFlag = ((stSystemData.MonitorFlag & 0xFC) | x)
//------------------------------------------------------------------------------
// Reset
//------------------------------------------------------------------------------
#define _RESET_SELECT_STATE 0x40
#define _RESET_NO_STATE 0x00
#define _GET_RESET_SELECT_STATE() (stOsdUserData.OsdSettingFlag & _BIT6)
#define _SET_RESET_SELECT_STATE(x) stOsdUserData.OsdSettingFlag = (stOsdUserData.OsdSettingFlag & (~_BIT6)) | x
//------------------------------------------------------------------------------
#define GET_OSD_SIZE() (stSystemData.MonitorFlag & _BIT3)
#define SET_OSD_SIZE(x) stSystemData.MonitorFlag = ((stSystemData.MonitorFlag & (~_BIT3)) | (x << 3))
#define _GET_POWER_DOWN_TIME() ((stTvInfo.TvSettingFlag >> 2) & 0x0F)
#define _SET_POWER_DOWN_TIME(x) stTvInfo.TvSettingFlag = (stTvInfo.TvSettingFlag & 0xC3) | (x << 2)
//--------------------------------------------------
// Macro of Color Temperature
//--------------------------------------------------
#define GET_COLOR_TEMP_TYPE() (stSystemData.ColorTemp & (_BIT3 | _BIT2 | _BIT1 | _BIT0))
#define SET_COLOR_TEMP_TYPE(x) (stSystemData.ColorTemp = ((stSystemData.ColorTemp & ~(_BIT3 | _BIT2 | _BIT1 | _BIT0)) | x))
//------------------------------------------------------------------------------
//FM
//------------------------------------------------------------------------------
#define GET_FM_TYPE() (stSystemData.ColorTemp & (_BIT7 | _BIT6 | _BIT5 | _BIT4)) >> 4//(stAudioData.Mode & (_BIT7 | _BIT6 | _BIT5 | _BIT4)) >> 4//(stSystemData.ColorTemp & (_BIT7 | _BIT6 | _BIT5 | _BIT4)) >> 4
#define SET_FM_TYPE(x) (stSystemData.ColorTemp = ((stSystemData.ColorTemp & ~(_BIT7 | _BIT6 | _BIT5 | _BIT4)) | x<<4))//(stAudioData.Mode = ((stAudioData.Mode & ~(_BIT7 | _BIT6 | _BIT5 | _BIT4)) | x<<4))
#define GET_FM_STATE() (stSystemData.MonitorFlag & _BIT4)
#define SET_FM_STATE(x) stSystemData.MonitorFlag = (stSystemData.MonitorFlag & (~_BIT4)) | (x << 4)
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
//Screnn 0,90,180,270,
//------------------------------------------------------------------------------
#define GET_SCREEN_UD() ((stSystemData.ClientDef & _BIT7) >> 7)
#define SET_SCREEN_UD(x) stSystemData.ClientDef= (stSystemData.ClientDef & (~_BIT7)) | (x << 7)
#define GET_SCREEN_LR() ((stSystemData.ClientDef & _BIT6) >> 6)
#define SET_SCREEN_LR(x) stSystemData.ClientDef= (stSystemData.ClientDef & (~_BIT6)) | (x << 6)
//------------------------------------------------------------------------------
//IR
//------------------------------------------------------------------------------
#define _GET_IR_MODE() ((bit)(stSystemData.IRStatus & _BIT1))
#define _SET_IR_MODE() (stSystemData.IRStatus |= _BIT1)
#define _CLR_IR_MODE() (stSystemData.IRStatus &= ~_BIT1)
//------------------------------------------------------------------------------
#define _CT_9300 0
#define _CT_6500 1
#define _CT_5800 2
#define _CT_SRGB 3
#define _CT_USER 4
//--------------------------------------------------
// Struct Type
//--------------------------------------------------
typedef struct
{
UINT8 PolarityFlag;
UINT16 IHWidth; // Input Horizontal Width
UINT16 IVHeight; // Input Vertical Height
UINT16 IHFreq; // Input Horizontal Frequency
UINT16 IVFreq; // Input Vertical Frequency
UINT8 IHFreqTolerance; // Input Horizontal Frequency Tolerance
UINT8 IVFreqTolerance; // Input Vertical Frequency Tolerance
UINT16 IHTotal; // Input Horizontal Total Length
UINT16 IVTotal; // Input Vertical Total Length
UINT16 IHStartPos; // Input Horizontal Start Position
UINT16 IVStartPos; // Input Vertical Start Position
} ModeTableType;
//------------------------------------------------------
typedef struct
{
UINT16 DHTotal; // Display Horizontal Total Length
UINT16 DHWidth; // Display Horizontal Width
UINT16 DVHeight; // Display Vertical Height
UINT16 DVStartPos; // Display Vertical Start Position
} DisplayTableType;
//------------------------------------------------------
typedef struct
{
UINT8 ModeCurr; // Input Mode
UINT8 Polarity; // BIT0: H Polarity, Bit1: V Polarity
UINT16 IHFreq; // Input Horizontal Frequency
UINT16 IVFreq; // Input Vertical Frequency
UINT16 IHTotal; // Input Horizontal Total Length
UINT16 IVTotal; // Input Vertical Total Length
UINT16 IHWidth; // Input Horizontal Width
UINT16 IVHeight; // Input Vertical Height
UINT16 IHStartPos; // Input Horizontal Start Position
UINT16 IVStartPos; // Input Vertical Start Position
UINT16 IHCount; // Input Horizontal Count Numbers
UINT16 IHSyncPulseCount; // Input Horizontal Sync Pulse Count Numbers
} ModeInformationType;
//------------------------------------------------------
typedef struct
{
UINT8 PanelStyle; // Panel Style
UINT8 PanelConfig; // Panel Configuration
UINT16 DHStartPos; // Display Horizontal Start Position
UINT16 DHWidth; // Display Horizontal Width
UINT16 DHTotal; // Display Horizontal Total Clock Number in One Display Line
UINT16 PalDHTotal; // Display Horizontal Total Clock Number in One Display Line for CVBS PAL
UINT16 NtscDHTotal; // Display Horizontal Total Clock Number in One Display Line for CVBS NTSC
UINT16 DVStartPos; // Display Vertical Start Position
UINT16 DVHeight; // Display Vertical Height
UINT16 DVTotal; // Display Vertical Total Line Number in One Frame
UINT8 DHSyncWidth; // Display H Sync Width
UINT8 DVSyncHeight; // Display V Sync Height
UINT16 PixelClock; // Typical Pixel Clock in MHz
UINT16 HSyncMaxFreq; // H Sync Max Freq Unit in 0.1 kHZ
UINT16 HSyncMinFreq; // H Sync Min Freq Unit in 0.1 kHZ
UINT16 VSyncMaxFreq; // V Sync Max Freq Unit in 0.1 HZ
UINT16 VSyncMinFreq; // V Sync Min Freq Unit in 0.1 HZ
UINT8 TTL20;
} PanelType;
//------------------------------------------------------
typedef struct
{
UINT8 FirstAuto; // First Auto
UINT16 HPosition; // Horizontal Position
UINT16 VPosition; // Vertical Position
UINT16 Clock; // Clock Adjust
UINT8 Phase; // Phase Adjust
} StructModeUserDataType;
//------------------------------------------------------
typedef struct
{
UINT8 ModeNum; // Mode Number
UINT16 IHFreq; // Input Horizontal Frequency
UINT16 IVFreq; // Input Vertical Frequency
} StructModeUserFIFODataType;
//------------------------------------------------------
typedef struct
{
UINT16 CenterHPos; // Horizontal Position
UINT16 CenterVPos; // Vertical Position
UINT16 CenterClock; // Clock Adjust
} StructModeUserCenterDataType;
//------------------------------------------------------
typedef struct
{
UINT8 MonitorFlag; // Bit 7: Monitor Power Status
// Bit 6: DVI-I/VGA switch flag
// Bit 5: Blue background 0-> Disable 1->Enable
// Bit 4: Reserved
// Bit 3: OSD Size 0-> Normal 1-> Double
// Bit 2: Burnin 0-> Off 1-> On
// Bit 1~0: Display mode 0-> full 1-> 4:3 2-> auto
UINT8 InputSource;
UINT8 BackLight;
UINT8 ColorTemp;
UINT8 Sharpness;
//bit 7~4 Peaking-Coring
// [ 000b: Disable]
// [ 001b: Mode 1 ]
// [ 010b: Mode 2 ]
// [ 011b: Mode 3 ]
// [ 100b: Mode 4 ]
//bit 3~0 [ Sharpness ]
// [ 000b: Disable]
// [ 001b: Mode 1 ]
// [ 010b: Mode 2 ]
// [ 011b: Mode 3 ]
// [ 100b: Mode 4 ]
UINT8 UserFIFOMode;
UINT8 Hue;
UINT8 Saturation;
UINT8 YPbPrHue; // Ken
UINT8 YPbPrSaturation;//Ken
UINT8 Contrast; // for VDC 2612
UINT8 Brightness; // for VDC 2612
UINT8 Gamma;
// Bit 0: NR[1: On / 0:Off]
// Bit 1: Reserved
//bit 3~2 [ Display Ratio ]
// [ 01b : 4:3 ]
// [ 10b : 16:9 ]
// [ 11b : Letter Box ]
//bit 4~6 [ Gamma ]
// [ 000b: Disable ]
// [ 001b: Gamma 1 ]
// [ 010b: Gamma 2 ]
// [ 011b: Gamma 3 ]
// [ 100b: Gamma 4 ]
// Bit 7: DOS mode select
UINT8 ucColorSetting;
// bit 7 [Black Level Expansion ]
// bit 6 [Auto Image ]
// bit 5 [Flesh Tone ]
// bit 4 [Reserved ][NonLinear Enable ]
// bit 3~1[DCC Mode ]
// [ 000b: Disable ]
// [ 001b: Mode 1 ]
// [ 010b: Mode 2 ]
// [ 011b: Mode 3 ]
// [ 100b: Mode 4 ]
// [101b~111b: Reserved ]
// bit 0 [ICM 0: Disable 1: Enable ]
UINT8 CcSystem;
//bit 7~4 [ Nonlinear Scaling]
// [ 00b : Off ]
// [ 01 ~ 10 On ]
// bit 3~0
// 0: ccmute
// 1: CC1, 2:CC2, 3:CC3, 4:CC4,
// 5: TT1, 6:TT2, 7:TT3, 8:TT4
UINT8 Mode;//use for picture mode and audio mode
//-------picture mode--------
//bit 7~4 [0: standard 标准]
// [1: bright 亮丽]
// [2: MILD 柔和]
// [3: movie 电影]
// [4: user 用户]
//--------audio mode---------
//bit 0~3 [0: standard 标准]
// [1: THEATER 影院]
// [2: music 音乐]
// [3: news 新闻]
// [3: user 用户]
//---------------------------------------
UINT8 ClientDef; //jokerxie for chuangfeng 08-05-05
//bit 7 [0:Screen 0 1:Screen 180 ]
//bit 6 [0:Screen 90 1:Screen 270 ]
//bit 5 Reserved
//bit 4 Reserved
//bit 3 Reserved
//bit 2 Reserved
//bit 1 Reserved
//bit 0 Reserved
BYTE IRStatus;
} StructSystemDataType;
//------------------------------------------------------
typedef struct
{
UINT8 ICM_COLOR[10]; //0~9 use for RGBYC
//leo 20060613 add black level
#if(_BLACK_LEVEL == _ENABLE)
UINT8 BlackLevel;
UINT8 WhiteLevel;
#endif
}StructICMColor;
//------------------------------------------------------
typedef struct
{
BYTE KeyMessage;
BYTE OsdEvent;
}SKeyToOsdEvent;
//------------------------------------------------------
#define GET_DCC_MODE() ((stSystemData.ucColorSetting & (_BIT3 | _BIT2 | _BIT1)) >> 1)
#define SET_DCC_MODE(x) (stSystemData.ucColorSetting = (stSystemData.ucColorSetting & ~(_BIT3 | _BIT2 | _BIT1)) | (x<<1))
//leo 20060613 add black level
#if(_BLACK_LEVEL == _ENABLE)
#define GET_BLACKLEVEL() (stICMColor.BlackLevel)
#define SET_BLACKLEVEL(x) (stICMColor.BlackLevel = x)
#define GET_WHITELEVEL() (stICMColor.WhiteLevel)
#define SET_WHITELEVEL(x) (stICMColor.WhiteLevel = x)
#endif
#define GET_ICM_on_off() ((stSystemData.ucColorSetting & _BIT0))
#define SET_ICM_on_off() (stSystemData.ucColorSetting |=( _BIT0))
#define CLR_ICM_on_off() (stSystemData.ucColorSetting &= (~_BIT0))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -