📄 power.lst
字号:
C51 COMPILER V8.01 POWER 11/28/2006 08:08:10 PAGE 1
C51 COMPILER V8.01, COMPILATION OF MODULE POWER
OBJECT MODULE PLACED IN ..\..\1out\power.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ..\..\msFunc\power.c BROWSE INCDIR(..\..\inc;..\..\mslib;..\..\Device;..\..
-\kernal;..\..\msFunc;..\..\pc;..\..\tv) DEBUG OBJECTEXTEND PRINT(..\..\1out\power.lst) OBJECT(..\..\1out\power.obj)
line level source
1 #define _POWER_C_
2
3 #include "types.h"
4 #include "board.h"
5 #include "global.h"
6 #include "ms_reg.h"
7 #include "panel.h"
8 #include "misc.h"
9 #include "ms_rwreg.h"
10 #include "mstar.h"
*** WARNING C322 IN LINE 93 OF ..\..\INC\MSTAR.H: unknown identifier
11 #include "DEBUG.h"
12 #include "msOsd.h"
13 #include "Tda7052.h"
14 #include "devvd.h"
15 #include "menudef.h"
16
17 #define TurnOffOSD 1
18
19 void Power_TurnOffPanel(void);
20 void Power_PowerOffSystem(void);
21 extern void PanelReversal(BYTE Position);
22
23 //=============================================
24 // Control system power status
25 // caller : main()
26 void Power_PowerHandler(void)
27 {
28 1 if (ForcePowerSavingFlag)
29 1 {
30 2 Clr_ForcePowerSavingFlag(); // clear force power saving flag
31 2 if (!PowerSavingFlag)
32 2 { printMsg("enter power saving");
33 3 Power_PowerOffSystem();
34 3 }
35 2 }
36 1 }
37
38 void Power_PowerOnSystem(void)
39 {
40 1 Power_TurnOffPanel();
41 1 msPowerUp();
42 1 Clr_PowerSavingFlag();
43 1 Set_InputTimingChangeFlag();
44 1 SrcFlags|=SyncLoss;
45 1
46 1 Clr_SleepTimeoutFlag();
47 1 g_uwSleepTimeCounter=0;
48 1 g_VideoSetting.SleepTime=SleepTimeOff;
49 1
50 1 Clr_ForcePowerONFlag();
51 1 Clr_EnableONTimeFlag();
52 1
53 1 #if TV_ENABLE
C51 COMPILER V8.01 POWER 11/28/2006 08:08:10 PAGE 2
54 1 if (IsTVInUse())
55 1 Set_ChannelChangFlag();
56 1 #endif
57 1
58 1 Set_ShowSourceFlag();
59 1 hw_SetTunerOn();
60 1 }
61
62 void Power_PowerOffSystem(void)
63 {
64 1 Power_TurnOffPanel();
65 1 msPowerDown();
66 1 Set_PowerSavingFlag();
67 1 Clr_InputTimingChangeFlag();
68 1 g_ucOsdCounter=0;
69 1 g_ucPowerDownCounter=0;
70 1
71 1 Clr_EnableOFFTimeFlag();
72 1
73 1 Clr_SleepTimeoutFlag();
74 1 g_uwSleepTimeCounter=0;
75 1 g_VideoSetting.SleepTime=SleepTimeOff;
76 1
77 1 Clr_OsdTimeoutFlag();
78 1 hw_SetTunerOff();
79 1 }
80
81 void Power_TurnOnGreenLed(void)
82 {
83 1 hw_SetGreenLed();
84 1 }
85 void Power_TurnOffGreenLed(void)
86 {
87 1 hw_ClrGreenLed();
88 1 }
89
90 void Power_TurnOnPanel(void)
91 {
92 1 #if (PANEL_DIGITAL_TCON|PANEL_ANALOG_TCON) //LSP2006-5-9
*** WARNING C322 IN LINE 92 OF ..\..\msFunc\power.c: unknown identifier
93 1 msWriteByte(BK0_00_REGBK, REG_BANK1_ADC_ACE_MCU); // Switch to Bank 1 for TCON control
94 1 msWriteByte(BK1_D0_PTC_MODE1, SET_PTC_MODE1); // Enable TCON
95 1 msWriteByte(BK0_00_REGBK, REG_BANK_SCALER); // Switch to Bank 0
96 1 #endif
97 1
98 1
99 1 #if PANEL_ANALOG_TCON
100 1 msWriteByte(BK0_00_REGBK, REG_BANK1_ADC_ACE_MCU); // Switch to Bank 1 for TCON control
101 1 msWriteByte(BK1_4A, 0x00); // Turn on VGL and VGH
102 1 msWriteByte(BK1_4B, 0x40);
103 1 msWriteByte(BK1_45, 0x00);
104 1 #endif
105 1
106 1 Delay1ms(PanelOnTiming1);
*** ERROR C202 IN LINE 106 OF ..\..\MSFUNC\POWER.C: 'PanelOnTiming1': undefined identifier
107 1
108 1 hw_SetPanelPower();
109 1
110 1 msWriteByte(BK0_00_REGBK, REG_BANK_SCALER); // Switch to Bank 0 for data output control
111 1 msWriteByte(BK0_F4_TRISTATE, 0x00); // Enable data output
112 1
113 1 PanelReversal(g_VideoSetting.DOWN);
C51 COMPILER V8.01 POWER 11/28/2006 08:08:10 PAGE 3
114 1
115 1 Delay1ms(PanelOnTiming2);
*** ERROR C202 IN LINE 115 OF ..\..\MSFUNC\POWER.C: 'PanelOnTiming2': undefined identifier
116 1
117 1 if (g_bInputTimingChangeFlag)
118 1 Power_TurnOffPanel();
119 1 else
120 1 {
121 2 #if (CCFL_FUNCTION)
msWriteByte(BK0_00_REGBK, REG_BANK4_LVDS_CCFL);
msWriteByte(BK4_6B, 0x80);
msWriteByte(BK4_9A, 0xCF);
msWriteByte(BK4_6E, 0x0D);
if(!(g_VdInfo.wVideoStatus& VD_VSYNC_50HZ))
msWriteByte(BK4_AC, 0x61);
else
msWriteByte(BK4_AC, 0x81);
msWriteByte(BK4_6D, 0x03);
msWriteByte(BK0_00_REGBK, REG_BANK_SCALER);
#else
135 2 hw_SetBlacklit(); // Turn on backlight
136 2 #endif
137 2
138 2 devAudioInputSelect();
139 2 if(!(g_VdInfo.wVideoStatus& VD_HSYNC_LOCKED))
140 2 SetAudioMute();
141 2 else
142 2 {
143 3 if(!g_VideoSetting.MuteStatus)
144 3 devAudioSetVolume(g_VideoSetting.volume);
145 3 }
146 2 }
147 1 }
148
149 void Power_TurnOffPanel(void)
150 {
151 1 // devAudioWrite(0);
152 1 // Delay1ms(20);
153 1 SetAudioMute();
154 1 #if TurnOffOSD
155 1 msWriteOSDByte(OSD_01_OSDDBC, 0x00); // disable osd double buffer
156 1 msWriteOSDByte(OSD_0C_IOSDC1, 0);
157 1 // msWriteOSDByte(BK0_01_DBFC, 0x0); // disable double buffer
158 1 // msWriteByte(OCTRL2, msReadByte(OCTRL2)|BLKS_B);
159 1 Delay4us();
160 1 #endif
161 1
162 1
163 1 #if (CCFL_FUNCTION)
msWriteByte(BK0_00_REGBK,REG_BANK4_LVDS_CCFL);
msWriteByte(BK4_6B, 0x80);
msWriteByte(BK4_6D, 0x00);
msWriteByte(BK4_6E, 0x05);
msWriteByte(BK4_6B, 0x00);
msWriteByte(BK0_00_REGBK, REG_BANK_SCALER);
#else
171 1 hw_ClrBlacklit(); // Turn off panel VDD
172 1 #endif
173 1
174 1 //hw_ClrBlacklit();
C51 COMPILER V8.01 POWER 11/28/2006 08:08:10 PAGE 4
175 1 Delay1ms(PanelOffTiming1);
*** ERROR C202 IN LINE 175 OF ..\..\MSFUNC\POWER.C: 'PanelOffTiming1': undefined identifier
176 1
177 1 #if (PANEL_DIGITAL_TCON|PANEL_ANALOG_TCON)
*** WARNING C322 IN LINE 177 OF ..\..\msFunc\power.c: unknown identifier
178 1 msWriteByte(BK0_00_REGBK, REG_BANK1_ADC_ACE_MCU); // Switch to Bank 1 for TCON control
179 1 msWriteByte(BK1_D0_PTC_MODE1, (SET_PTC_MODE1&0x7F)); // Disable TCON
180 1 #endif
181 1
182 1 PanelReversal(g_VideoSetting.DOWN);
183 1
184 1 msWriteByte(BK0_00_REGBK, REG_BANK_SCALER); // Switch to Bank 0 for data output control
185 1 msWriteByte(BK0_F4_TRISTATE, 0x1F); // Disable data output
186 1
187 1 Delay1ms(PanelOffTiming2);
*** ERROR C202 IN LINE 187 OF ..\..\MSFUNC\POWER.C: 'PanelOffTiming2': undefined identifier
188 1 hw_ClrPanelPower();
189 1
190 1 #if PANEL_ANALOG_TCON
191 1 msWriteByte(BK0_00_REGBK, REG_BANK1_ADC_ACE_MCU); // Switch to Bank 1 for TCON control
192 1 msWriteByte(BK1_4A, 0x0F); // Turn off VGL and VGH
193 1 msWriteByte(BK1_4B, 0x4C);
194 1 msWriteByte(BK0_00_REGBK, REG_BANK_SCALER); // Switch to Bank 0
195 1 #endif
196 1
197 1 #if TurnOffOSD
198 1 msWriteOSDByte(OSD_01_OSDDBC, 0x5); // enable double
199 1 #endif
200 1
201 1 g_ucSyncMaxStableCounter=150;
202 1 }
203
C51 COMPILATION COMPLETE. 3 WARNING(S), 4 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -