?? c_root.c
字號:
/*------------------------------------------------------------------------------
C_ROOT.C
Copyright 1995-1996 Keil Software, Inc.
------------------------------------------------------------------------------*/
#include <reg51.h>
#include "Common.h"
#include "Global.h"
#include "ICControl.h"
#include "Initial.h"
#include "System.h"
#include "TWICreg.h"
#include "Timer0.h"
#include "VideoSourceSwitch.h"
#include "VideoDetect.h"
#include "OSD1CSL.h"
#include "OSD2CSL.h"
#include "E_OSDString.H"
#include "Keypad.h"
#include "EventPass.h"
#include "com.h"
#include "UIDraw.h"
#include "VGADetect.h"
/*****************************************************************************
* Public Function Prototypes *
*****************************************************************************/
void SysInterruptEnable(void);
static uWORD AutoDetcTime=0;
void main(void)
{
Initial();
#ifdef DEBUG_MODE
ShowMsg("Initial Step####\n\0");
#endif
EepPublic.cSource=0;
SourceSelect();
SysInterruptEnable();
DetectSignalStd();
Detect_Sig(0);
OSD1ShowSource();
while(1)
{
#ifdef AUTO_DETECT
AutoDetcTime++;
if(AutoDetcTime>=0x4ff)
{
AutoDetcTime=0x00;
if (uiaSrcMux1[EepPublic.cSource].SourceRoute==isrcVIDEO)
DetectSignalStd();
Detect_Sig(0);
IC_WritByte(TWIC_P0, 0xE2, 0x11);
}
#endif
#ifdef PC_MODE
if(EepPublic.cSource == 2)
{
//if(IC_ReadByte(TWIC_P0, 0x32)&0xc0)
//{
DetectVGAMOde();
//}
}
#endif
if(m_bTimer0Overflow)
{
m_bTimer0Overflow=0;
OSD2Disable();
OSD1Disable();
}
if(m_cCurreKey!=0)
EventPass();
}
}
void SysInterruptEnable(void)
{
//IC_WritByte(TWIC_P0, INTMASK_REG, IC_ReadByte(TWIC_P0,INTMASK_REG)&0xF0);
IC_WritByte(TWIC_P0,INSTS2_REG,0x01);
Timer0Reset();
ET0 = 1; // Enable Timer0 interrupt
TR0 = 0;
EX0 = 1; // Enable Externel Interrup 0
EA = 1; // Enable Interrupt
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -