?? main.c
字號:
#include "8051.H"
#include "stdio.h"
#include "MyDef.H"
#include "F63XREG.H"
#include "F63XDEF.H"
#include "MCU.H"
#include "RAM.H"
#include "IIC.H"
#include "UserAdj.H"
#include "ModeHandle.H"
#include "Scaler.H"
#include "OSD.H"
#include "sRGB.H"
#include "ROM_MAP.H"
#include "SAA7114.H"
//#include "dvKeypad.h"
extern WarmUp();
void main(void) using 0
{
//unsigned char ch;
EA = 0;
InitMCU();
BackLightTimerEn = 0;
#if PRINT_MESSAGE
printf("Start Program\n");
#endif
AUDIO_MUTE();
CheckIIC();
DDC2();
CLRWDT = 0x55;
flag1 = 0;
flag2 = 0;
KeyBuffer = 0 ;
ChangeMode = 1;
VideoMute = 1;
H_SYNC = 0x5555;
V_SYNC = 0x5555;
SavePointer = 0xff;
RegPage = 0x55;
TvMode = 0;
FastMuteEnable = 0;
BypassSOG = 0;
BurnInPattern = 0;
LoadDDCData();
LocalTimer = 10;
while(LocalTimer != 0)
{
MiscProcess(0);
ADC_CON = (STRT_ADC | EN_ADC3); //Channel; // Start AD Convert
while(!(ADC3_REG & CMP_ADC));
if((ADC3_REG & 0x7f) < 0x40)
LocalTimer = 25;
}
#if PRINT_MESSAGE
printf("Main power OK.\n");
#endif
ResetOn(); //reset scaler
Sleep(12);
ResetOff();
Sleep(50);
WriteIIC563(0x101, 0x20);
Sleep(12);
WriteIIC563(0x101, 0x0f);
ScanKeyPad();
//KeyScan();
if(KeyBuffer == (vkMENU|vkVADOWN|vkPOWER))
InitEEPROM();
CheckVersion();
//Read the scaler version
SCRev = (ReadIIC563(0x100) >> 4);
UserModePtr = Read24C16(ep_User_Ptr);
StatusFlag = Read24C16(ep_Status);
FuncBuf[pVIDEOSOURCE] = Read24C16(ep_Sync_Source);
if(!PowerStatus)
PowerOffProcess();
if(FuncBuf[pVIDEOSOURCE] == 1) //DVI
SyncMode = 3;
else if(FuncBuf[pVIDEOSOURCE] == 2)
SyncMode = 4;
else
SyncMode = 0;
if(KeyBuffer == (vkVADOWN|vkVALUP))
{
FactMode = 1;
Write24C16(ep_Status,StatusFlag);
}
if(FactMode)
{ //factory mode befor power off
FuncBuf[pCOLORTEMP] = 2;
FuncBuf[pLANGUAGE] = 0;
Write24C16(ep_Color_Ptr,2);
#if PRINT_MESSAGE
printf("Factory mode\n");
#endif
}
LED_GrnOn();
LoadModeIndependentSettings();
PanelPowerOn();
//XAO_On();
InitScaler();
OsdInit();
#if PRINT_MESSAGE
printf("Test for debug.\n");
#endif
SetInverter();
LoadADC_Gain();
PowerTimer = POWER_TIME-100; //search sync start
if(BurnInMode)
FuncBuf[pVIDEOSOURCE] = 0;
if(FuncBuf[pVIDEOSOURCE] > 2)
{
FuncBuf[pVIDEOSOURCE] = 0;
Write24C16(ep_Sync_Source,0);
}
SetBrightness();
SetContrast();
SetAudioVolume();
//SetAudioMute();
//SetVCM_Vol();
SetLightBrightness();
SetLightContrast();
SetLightHS();
SetLightHW();
SetLightVS();
SetLightVH();
#if ContrastBlock == BackEndGain
sRGB(50,128,128,128);
#endif
if(BurnInMode)
ShowBurnInPattern(1);
while(1)
{
//if(!Saa7114Status())
// {
CheckFreq();
//if(!FactMode)
PowerSaveingProcess();
SyncSource(0);
// }
//else
// CheckVideo();
KeyProcess();
AdjustProcess();
OsdProcess();
// }
MiscProcess(1);
LocalTimer = 10;
while(LocalTimer != 0)
{
ADC_CON = (STRT_ADC | EN_ADC3); //Channel; // Start AD Convert
while(!(ADC3_REG & CMP_ADC));
if((ADC3_REG & 0x7f) < 0x40){
LocalTimer = 25;
WarmUp();
}
}
//if(FactMode && (MenuPtr.Menu == 2))
//{
// ShowBackLightTime();
//}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -