📄 modetbl.h
字号:
//---------------------------------------------------------------------------
// Terawins Inc. Company Confidential Strictly Private
//
// $Archive: ModeTbl.h $
// $Revision: 1.0 $
// $Author: jwang $
// $Date: 2002/07/24 $
//
// --------------------------------------------------------------------------
// >>>>>>>>>>>>>>>>>>>>>>>>> COPYRIGHT NOTICE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// --------------------------------------------------------------------------
// Copyright 2002 (c) Terawins Inc.
// --------------------------------------------------------------------------
#ifndef __MODETABLE_h
#define __MODETABLE_h
typedef struct tagMODE_DESCRIPTOR
{
// Htotal = HBlk + HSyncWidth + Hsst + HRes
// VTotal = VBlk + VSyncWidth + Vsst + VRes
uWORD wHTotal ; // (HTotal = HsyncWidth + Hsst + HRes + HFrontPorch)
uWORD wVTotal ; //
uCHAR cVBlk ; // (BackPorch + TopBorder + SyncWidth)
uWORD wHBlk ; // (BackPorch + LeftBorder + SyncWidth)
uCHAR cResID ; // (Index into Resolution table)
uCHAR cModeFlags0 ; // HSync(0x02) VSync(0x01)
uCHAR cModeFlags1 ; // bMotionVideo bSubSample(bFrameLocked) bDoubSample(bTriLevelSync) bDosMode
// bOutOfRange bDigitalMode bLowTolerance bIgnoreVRES
uCHAR cModeFlags2 ; // bVCORange[7,6] bChargePump[5,4,3] bAPLL_Sel_HighFreq[0]
uWORD wHPeriodCount; // Horizontal Period in 32 HSync lines XCLK count
uDWORD dwVFrameCount; // Vertical Sync count with XCLK
} MODE_DESCRIPTOR, *PMODE_DESCRIPTOR;
//Masks for cModeFlags0
#define bHSYNC_POSITIVE 0x01
#define bVSYNC_POSITIVE 0x02
#define DSPPLL_MASK 0x0c
//Masks for cModeFlags1
#define bMotionVideo 0x80
#define bSubSample 0x40
#define bDoubSample 0x20
#define bDosMode 0x10
#define bOutOfRange 0x08
#define bDigitalMode 0x04
#define bLowTolerance 0x02
#define bIgnoreVRES 0x01
//Masks for cModeFlags2
#define bNoAuto 0x80
#define bTextModePos 0x40
#define bTEXT_MODE_POS 0x40
#define bAltHTotal 0x20
#define fVCORange 0x18
#define fChargePump 0x07
#define SYNC_POLARITY 0x03
//---------------------------------------------------------------------------
typedef struct tagALT_HTOTAL
{
uCHAR cModeID; // Main Mode Table Index
uCHAR cResID; // Resolution Table Index
uWORD wHTotal; // HTotal = HSyncWidth + Hsst + HRes + HBlk
uWORD wHBlk; // BackPorch + LeftBorder
uCHAR cVBlk; // BackPorch + TopBorder
uCHAR cModeFlags; // VCORange[2] ChargePump[3] bit[6]:bSubSample bit[5]:bDoubSample
} ALT_HTOTAL;
//---------------------------------------------------------------------------
typedef struct tagRESOLUTION
{
uWORD wHRes;
uWORD wVRes;
} RESOLUTION;
typedef struct tagCOLORCALIBRATION
{
uCHAR cGainR;
uCHAR cGainG;
uCHAR cGainB;
uCHAR cOffsetR;
uCHAR cOffsetG;
uCHAR cOffsetB;
} ADC_GAIN_OFFSET;
typedef struct tagVGAState
{
unsigned char PositionH;
unsigned char PositionV;
unsigned short HATV;
unsigned short VATV;
unsigned short HDispSize;
unsigned short VDispSize;
unsigned short AdjHATV;
unsigned short AdjVATV;
float fHDispSize;
float fVDispSize;
unsigned char Phase;
unsigned char ADCHBaPorch;
unsigned char ADCVBaPorch;
}VGAPOSTATE;
#endif // __MODETABLE_h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -