📄 main.lst
字号:
C51 COMPILER V7.50 MAIN 03/18/2008 22:29:06 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN ..\1out\Main.obj
COMPILER INVOKED BY: D:\设计软件\Keil\C51\BIN\C51.EXE ..\KERNEL\Main.c BROWSE INCDIR(..\INC\;..\PANEL\;..\UI\;..\OPTION\
-;..\SCALER\DSP\) DEFINE(MCU_TYPE_SEL=0) DEBUG OBJECTEXTEND PRINT(..\1out\Main.lst) OBJECT(..\1out\Main.obj)
line level source
1 /******************************************************************************
2 Copyright (c) 2005 MStar Semiconductor, Inc.
3 All rights reserved.
4
5 [Module Name]: Main.c
6 [Date]: 04-Jan-2005
7 [Comment]:
8 Main subroutines.
9 [Reversion History]:
10 *******************************************************************************/
11
12 #define _MAIN_C_
13
14 /********************
15 * INCLUDE FILES *
16 *********************/
17 #include "Typedef.h"
18 #include "Project.h"
19 #include "Debug.h"
20 #include "Mcu_reg.h"
21 #include "Mcu.h"
22 #include "Global.h"
23 #include "Define.h"
24 #include "Ms7X_reg.h"
25 #include "Ms_RWreg.h"
26 #include "I2C.h"
27 #include "Debug.h"
28 #include "SI2C.h"
29 #include "Mcu_reg.h"
30 #include "Misc.h"
31 #include "Mst7x.h"
32 #include "Sync.h"
33 #include "Ms_Func.h"
34 #include "OSDMenu.h"
35 #include "IR_Func.h"
36 #include "OSDKey.h"//20050920
37
38 #if ((MARIA_TYPE_SEL == MARIA_2) && ENABLE_VD_DSP)
#include "Maria2_dsp_lib.h"
#endif // ENABLE_VD_DSP
41
42 ////////////////////////////////
43 // Main program
44 ////////////////////////////////
45 void main()
46 {
47 1 #if(ENABLE_VD_DSP)
g_bEnableVDDSP = 0;
#endif
50 1
51 1 #if (BUS_TYPE_SEL == SERIAL_BUS) //kevin
mstBusInitial();
#endif
54 1
C51 COMPILER V7.50 MAIN 03/18/2008 22:29:06 PAGE 2
55 1 #if MCU_TYPE_SEL == MCU_MSTAR
56 1
57 1 while( (mstReadByte(GEN_00_REGBK) & 0xC0) != 0x80);
58 1
59 1 #if (MCU_XTAL_CLK_HZ == 18000000)
mstWriteByte(BK0_EE_PDMD2, 0xC0);
#endif
62 1
63 1 #else
while( (mstReadByte(GEN_00_REGBK) & 0xC0) != 0xC0);
#endif
66 1
67 1 #if PANEL_TYPE_SEL == PNL_LG07_AT
mstWriteByte(GEN_00_REGBK, REGBANKADC); // switch to Bank 1
mstWriteByte(BK1_4A, 0x00); // Turn on VGL and VGH
mstWriteByte(BK1_4B, 0x40);
mstWriteByte(GEN_00_REGBK, REGBANKSCALER); // Switch to Bank 0 for data output control
#endif
73 1
74 1 sysMcuInit(); // initialize MCU
75 1
76 1 #if RS232DBG
77 1 sysWriteString("-MCU Initialize final-\x0d\x0a");
78 1 sysWriteUartOneWord(0x4142);
79 1 sysWriteUartHex4(0x4455,0);
80 1 sysWriteDec(6677);
81 1 sysWriteUartDec6(8899);
82 1 sysWriteString(tChangeLine);
83 1 sysWriteString(__DATE2__);
84 1 sysWriteString(" - ");
85 1 sysWriteString(__TIME__);
86 1 sysWriteString(tChangeLine);
87 1 #endif // RS232DBG
88 1
89 1 //miscTurnOffPanel(); //20050908 kevin mask
90 1 PANEL_BLIGHT_OFF();//20050908 kevin
91 1 PANEL_VCC_OFF();//20050908 kevin
92 1 SET_LED_OFF();
93 1
94 1 mstMst7XInit(); // MST7XXX initialize
95 1
96 1
97 1
98 1 #if RS232DBG
99 1 sysWriteString(tChangeLine);
100 1 sysWriteString("-Maria Initial final-\x0d\x0a");
101 1 #endif //RS232DBG
102 1
103 1 sysVariableInit(); // Initialize global veriable and user settings
104 1
105 1 #if (BOARD_TYPE_SEL == BD_DEMO_7985M_IDP)
sysI2CWriteByte(0xBA, 0x33, 0x40); // Initial Ti5146 for CCIR656 input
sysI2CWriteByte(0xBA, 0x34, 0x11);
#endif
109 1
110 1 mstWriteByte(BK0_1E_INTSTD, 0x00); // Clear Sync interrupt status D
111 1 g_ucSystemFlag |= (INPUT_TIMING_CHANGE_FLAG + FIRST_AC_ON_FLAG); //20050908 kevin
112 1
113 1 //miscTurnOffPanel(); //kevin 20050908 mask
114 1 //osdOSDDrawSourceLable(); //kevin 20050908 mask
115 1
116 1 mstSyncSourceSwitch();
C51 COMPILER V7.50 MAIN 03/18/2008 22:29:06 PAGE 3
117 1
118 1
119 1 // For video decoder work crazy
120 1 //miscDelay1ms(300); //20050908 mask
121 1
122 1 #if RS232DBG
123 1 sysWriteString("-Enter while LOOP-\x0d\x0a");
124 1 #endif // RS232DBG
125 1
126 1 while(1)
127 1 {
128 2 #if RS232DBG
129 2 sysCheckUartCmd(); // Rs232 debug command process
130 2 #endif // RS232DBG
131 2
132 2
133 2 #if ((MARIA_TYPE_SEL == MARIA_2) && ENABLE_VD_DSP)
if(tOSDSourcSELSequence[Display.ucSourceSEL] < VGA)
{
if(g_bEnableVDDSP)
{
VD_DSP_Int();
VD_DSP();
}
//mstWriteByte(BK0_1E_INTSTD, 0x00);
}
#endif // ENABLE_VD_DSP
144 2
145 2 #if SI2C_ENABLE
146 2 sysSlaveI2CCommand(); // SI2C command process
147 2 #endif // SI2C_ENABLE
148 2
149 2 #if IR_ENABLE
150 2 optIRDecodeCommand(); // IR command process
151 2 #endif // IR_ENABLE
152 2
153 2 osdMenuHandler(); // OSD and Key process
154 2
155 2 #if ((MARIA_TYPE_SEL == MARIA_2) && ENABLE_VD_DSP)
if(tOSDSourcSELSequence[Display.ucSourceSEL] < VGA)
{
if(g_bEnableVDDSP)
{
VD_DSP_Int();
VD_DSP();
}
//mstWriteByte(BK0_1E_INTSTD, 0x00);
}
#endif // ENABLE_VD_DSP
166 2
167 2 mstSyncCheckSignal(); // Check signal chang process
168 2
169 2 mstSyncChangeHandler(); // Timing change process
170 2
171 2 #if ((MARIA_TYPE_SEL == MARIA_2) && ENABLE_VD_DSP)
if(tOSDSourcSELSequence[Display.ucSourceSEL] < VGA)
{
if(g_bEnableVDDSP)
{
VD_DSP_Int();
VD_DSP();
}
C51 COMPILER V7.50 MAIN 03/18/2008 22:29:06 PAGE 4
//mstWriteByte(BK0_1E_INTSTD, 0x00);
}
#endif // ENABLE_VD_DSP
182 2
183 2 if ((g_ucSystemFlag & INPUT_TIMING_CHANGE_FLAG) == 0)
184 2 {
185 3 if ((g_ucSystemFlag & NO_INPUT_SIGNAL_FLAG) == 0) // If have singnal input
186 3 {
187 4
188 4 #if(MARIA_TYPE_SEL == MARIA_1)
mstSyncVDGainHandler(0); // Vedio decoder AGC detect process
#endif
191 4
192 4 #if ENABLE_VD_COLOR_DETECT
mstVDColorBurstHandler(0);
#endif // ENABLE_VD_COLOR_DETECT
195 4
196 4 #if(MARIA_TYPE_SEL == MARIA_1)
mstHTotalCalibrateHandle(); // 20050804 Antony
#endif
199 4 }
200 3
201 3 if ((g_ucSystemFlag & SAVE_SETTING_FLAG) !=0)
202 3 {
203 4 mstSaveDisplayData();
204 4 g_ucSystemFlag &= ~SAVE_SETTING_FLAG;
205 4 }
206 3 }
207 2
208 2 #if (MCU_TYPE_SEL == MCU_W78E65)//20050920
while ((bit)(g_ucSystemFlag & ENTER_SPI_DEBUG) == TRUE)
{
osdKeyScanKeypad();
};
#endif
214 2 } // while loop
215 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 216 ----
CONSTANT SIZE = 92 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -