📄 dual_ddc.c
字号:
//**********************************************************************************************************
// The Software is proprietary, confidential, and valuable to Realtek Semiconductor
// Corporation ("Realtek"). All rights, including but not limited to copyrights,
// patents, trademarks, trade secrets, mask work rights, and other similar rights and interests,
// are reserved to Realtek. Without prior written consent from Realtek, copying, reproduction,
// modification, distribution, or otherwise is strictly prohibited. The Software shall be
// kept strictly in confidence, and shall not be disclosed to or otherwise accessed by
// any third party. @ <2003> - <2008> The Software is provided "AS IS" without any warranty of any kind,
// express, implied, statutory or otherwise.
//**********************************************************************************************************
#define __DUAL_DDC__
#include "Common\Header\Include.h"
//#if(_OSD_TYPE == _DUAL_OSD)
#if(_DDCCI_SUPPORT==_ON)
#if(_OSD_TYPE == _BENQ_OSD)
BYTE code CapabilitiesVgaDataBenq[]=
"(prot(monitor)type(LCD)model(G2410HD)cmds(01 02 03 07 0C E3 F3)vcp(02 04 05 06 08 0B 0C 0E 10 12 14(01 04 05 08 0B) 16 18 1A 1E 1F 20 30 3E 52 60(01 03) 6C 6E 70 AC AE B2 B6 C0 C6 C8 C9 CA CC(01 02 03 04 05 06 08 09 0A 0B 0D 12 14 1A 1E 1F 20) D6(01 05) DF)mswhql(1)asset_eep(40)mccs_ver(2.0))";
BYTE code CapabilitiesDviDataBenq[]=
"(prot(monitor)type(LCD)model(G2410HD)cmds(01 02 03 07 0C E3 F3)vcp(02 04 05 08 0B 0C 10 12 14(01 04 05 08 0B) 16 18 1A 52 60(01 03 04) 6C 6E 70 AC AE B2 B6 C0 C6 C8 C9 CA CC(01 02 03 04 05 06 08 09 0A 0B 0D 12 14 1A 1E 1F 20) D6(01 05) DF)mswhql(1)asset_eep(40)mccs_ver(2.0))";
#else
BYTE code CapabilitiesVgaDataGeneric[]=
"(prot(monitor)type(LCD)model(W2408)cmds(01 02 03 07 0C E3 F3)vcp(02 04 05 06 08 0E 10 12 14(05 06 08 0B) 16 18 1A 1E 1F 20 30 3E 52 60(01 03) 6C 6E 70 AC AE B2 B6 C0 C6 C8 C9 CA CC(01 02 03 04 05 06 09 0A) D6(01 05) DF)mswhql(1)asset_eep(40)mccs_ver(2.0))";
BYTE code CapabilitiesDviDataGeneric[]=
"(prot(monitor)type(LCD)model(W2408)cmds(01 02 03 07 0C E3 F3)vcp(02 04 05 08 10 12 14(05 06 08 0B) 16 18 1A 52 60(01 03 04) 6C 6E 70 AC AE B2 B6 C0 C6 C8 C9 CA CC(01 02 03 04 05 06 09 0A) D6(01 05) DF)mswhql(1)asset_eep(40)mccs_ver(2.0))";
#endif
BYTE xdata ActiveControlCode;
BYTE xdata ucNewControlValue;
#endif
#define DDCCI(COM,VCP) ((WORD)COM<<8|VCP)
#define _COMMAND_GET_VCP 0x01 //PC to Monitor and Monitor to PC
#define _COMMAND_SET_VCP 0x03 //PC to Monitor Only
#define _COMMAND_SAVE_SETTING 0x0C //PC to Monitor Only (Save to EEPROM)
#define _COMMAND_CAPABILITY 0xF3 //PC to Monitor and Monitor to PC (Capability String)
#define _COMMAND_GET_TIMING 0x07 //PC to Monitor and Monitor to PC (Timing Report)
#define _VCP_NEW_CONTROL_VALUE 0x02
#define _VCP_FACTORY_RESET 0x04//
#define _VCP_RESET_CONTRAST_BRIGHT 0x05//
#define _VCP_RESET_GEOMETRY 0x06
#define _VCP_RESET_COLOR 0x08//
#define _VCP_COLOR_TEMP_INC 0x0B
#define _VCP_COLOR_TEMP_REQ 0x0C
#define _VCP_CLOCK 0x0E//
#define _VCP_BRIGHT 0x10//
#define _VCP_CONTRAST 0x12//
#define _VCP_COLOR_TEMP 0x14//
#define _VCP_R_GAIN 0x16//
#define _VCP_G_GAIN 0x18//
#define _VCP_B_GAIN 0x1A
#define _VCP_AUTO 0x1E//
#define _VCP_AUTO_COLOR 0x1F//
#define _VCP_H_POS 0x20//
#define _VCP_V_POS 0x30
#define _VCP_PHASE 0x3E//
#define _VCP_ACTIVE_CONTROL 0x52
#define _VCP_INPUT_SOURCE 0x60
#define _VCP_BLACK_LEVEL_RED 0x6C
#define _VCP_BLACK_LEVEL_GRN 0x6E
#define _VCP_BLACK_LEVEL_BLU 0x70
#define _VCP_PIVOT 0xAA
#define _VCP_V_FREQUENCY 0xAE
#define _VCP_H_FREQUENCY 0xAC
//#define _VCP_STORE_RESTORE_SETTINGS 0xB0
#define _VCP_LCD_PATTERN 0xB2
#define _VCP_DISP_TECH_TYPE 0xB6
#define _VCP_DISPLAY_USAGE_TIME 0xC0//
#define _VCP_OSD_ENABLE_DISABLE 0xCA//
#define _VCP_CONTROLLER_TYPE 0xC8//
#define _VCP_DISPLAY_FIRMWARE_LEVEL 0xC9//
#define _VCP_LANGUAGE 0xCC
#define _VCP_POWER_MODE 0xD6//
#define _VCP_APPLICATION_ENABLE_KEY 0xC6
#define _VCP_VERSION 0xDF
#define _BENQ_GET_TIMING 0xF0
#define W_DEST_ADDR 0x6E
#define R_DEST_ADDR 0x50
#define CAPABILITYFRAGMENT_LEN 10
//====================================================================================//
#if(_DDCCI_SUPPORT==_ON)
void CDdcciCommandActive(void)
{
BYTE status=0;
ActiveControlCode=RamI2cCommandData[1];
if(RamI2cCommandData[0]==_COMMAND_CAPABILITY)
{
WORD length,offset;
BYTE i,CapaSTRlen;
offset=(((WORD)RamI2cCommandData[1]<<8)|RamI2cCommandData[2]);
if((GET_INPUTSOURCE_TYPE()== _SOURCE_VGA))
{//length : 临逞
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -