?? menufunc.lst
字號:
C51 COMPILER V8.01 MENUFUNC 11/28/2006 08:08:09 PAGE 1
C51 COMPILER V8.01, COMPILATION OF MODULE MENUFUNC
OBJECT MODULE PLACED IN ..\..\1out\MenuFunc.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ..\..\msFunc\MenuFunc.c BROWSE INCDIR(..\..\inc;..\..\mslib;..\..\Device;..
-\..\kernal;..\..\msFunc;..\..\pc;..\..\tv) DEBUG OBJECTEXTEND PRINT(..\..\1out\MenuFunc.lst) OBJECT(..\..\1out\MenuFunc.
-obj)
line level source
1
2 #define _MENUFUNC_C_
3
4 #include "types.h"
5 #include "board.h"
6 #include "global.h"
7 #include "keypaddef.h"
8 #include "menudef.h"
9 #include "adjust.h"
10 #include "ms_reg.h"
11 #include "DEBUG.h"
12 #include "msosd.h"
13 #include "power.h"
14 #include "misc.h"
15 #include "autofunc.h"
16 #include "nvram.h"
17 #include "userpref.h"
18 #include "panel.h"
19 #include "mstar.h"
*** WARNING C322 IN LINE 93 OF ..\..\INC\MSTAR.H: unknown identifier
20 #include "ms_rwreg.h"
21 #include "adjust.h"
22 #include "mcu.h"
23 #include "menustr.h"
24 #include "msAce.h"
25 #include "i2c.h"
26 #include "Tv.h"
27 #include "DevTuner.h"
28 #include "Tda7052.h"
29 #include "menufunc.h"
30 #include "Game.h"
31
32 extern BYTE OsdFontColor;
33
34 WORD DecIncValue(MenuItemActionType action, WORD value, WORD minValue, WORD maxValue, BYTE step)
35 {
36 1 if (action==MIA_IncValue || action==MIA_InvDecValue)
37 1 {
38 2 if (value>=maxValue)
39 2 return value;
40 2 minValue=value+step;
41 2 if (minValue>maxValue)
42 2 minValue=maxValue;
43 2 value=minValue;
44 2 }
45 1 else // Decrease value
46 1 {
47 2 if (value<=minValue)
48 2 return value;
49 2 maxValue=value-step;
50 2
51 2 if (maxValue<minValue)
52 2 maxValue=minValue;
C51 COMPILER V8.01 MENUFUNC 11/28/2006 08:08:09 PAGE 2
53 2 value=maxValue;
54 2 }
55 1 return value;
56 1 }
57
58 #if VGA_ENABLE
59 WORD GetScale100Value(WORD value, WORD minValue, WORD maxValue)
60 {
61 1 maxValue=maxValue-minValue;
62 1 value=value-minValue;
63 1 if (value>650)
64 1 {
65 2 value/=2;
66 2 maxValue/=2;
67 2 }
68 1 value=((WORD)value*100+maxValue/2)/maxValue;//modify word---->dword for tv search ,tzw
69 1
70 1 return value;
71 1 }
72 #endif
73
74 BOOL PowerOffSystem(void)
75 {
76 1 printMsg("turn off");
77 1 //devAudioWrite(0);
78 1 //Delay1ms(100);
79 1 SetAudioMute();
80 1 Power_PowerOffSystem();
81 1 Power_TurnOffGreenLed();
82 1 Clr_PowerOnFlag();
83 1 //NVRam_WriteByte(nvrVideoAddr(MonitorFlag), g_VideoSetting.MonitorFlag);
84 1 Clr_DoModeSettingFlag();
85 1 SetAudioStby();
86 1 return TRUE;
87 1 }
88
89 BOOL PowerOnSystem(void)
90 {
91 1 printMsg("turn on");
92 1 Power_PowerOnSystem();
93 1 Power_TurnOnGreenLed();
94 1 Set_PowerOnFlag();
95 1 //NVRam_WriteByte(nvrVideoAddr(MonitorFlag), g_VideoSetting.MonitorFlag);
96 1 msSetBlueScreen( _ENABLE, FR_BLUE);
*** WARNING C206 IN LINE 96 OF ..\..\MSFUNC\MENUFUNC.C: 'msSetBlueScreen': missing function-prototype
*** ERROR C267 IN LINE 96 OF ..\..\MSFUNC\MENUFUNC.C: 'msSetBlueScreen': requires ANSI-style prototype
*** ERROR C202 IN LINE 96 OF ..\..\MSFUNC\MENUFUNC.C: 'FR_BLUE': undefined identifier
97 1 Set_ShowSourceFlag();
98 1
99 1 return TRUE;
100 1 }
101 //==============================================for Video==================================
102 BOOL AdjustVideoContrast(MenuItemActionType action)
103 {
104 1 WORD tempValue;
105 1
106 1 if(IsVideoPortInUse())
107 1 {
108 2 tempValue=DecIncValue(action, g_VideoSetting.VideoContrast, MinDefVideoContrast, MaxDefVideoContrast,
- 1);
109 2 if (tempValue==g_VideoSetting.VideoContrast)
110 2 return FALSE;
C51 COMPILER V8.01 MENUFUNC 11/28/2006 08:08:09 PAGE 3
111 2 g_VideoSetting.VideoContrast=tempValue;
112 2
113 2 tempValue=usrNonLinearCalculate(g_NLCVideoContrast,g_VideoSetting.VideoContrast);
114 2
115 2 #if TV_ENABLE
116 2 if(IsTVInUse())
117 2 tempValue+=TV_EXTR_CONTRAST;
118 2 #endif
119 2
120 2 msAdjustVideoContrast(tempValue);
121 2 }
122 1 else
123 1 {
124 2 tempValue=DecIncValue(action, g_PcSetting.Contrast, MinDefContrast, MaxDefContrast, 1);
125 2 if (tempValue==g_PcSetting.Contrast)
126 2 return FALSE;
127 2 g_PcSetting.Contrast=tempValue;
128 2 msAdjustPCContrast(g_PcSetting.Contrast);
129 2 }
130 1 return TRUE;
131 1 }
132
133 WORD GetVideoContrastValue(void)
134 {
135 1 if(IsVideoPortInUse())
136 1 return g_VideoSetting.VideoContrast;
137 1 else
138 1 return g_PcSetting.Contrast;
139 1 }
140 //====================================================
141 BOOL AdjustVideoBrightness(MenuItemActionType action)
142 {
143 1 WORD tempValue;
144 1
145 1 if(IsVideoPortInUse())
146 1 {
147 2 tempValue=DecIncValue(action, g_VideoSetting.VideoBrightness, MinDefVideoBrightness, MaxDefVideoBrigh
-tness, 1);
148 2 if (tempValue==g_VideoSetting.VideoBrightness)
149 2 return FALSE;
150 2 g_VideoSetting.VideoBrightness=tempValue;
151 2 tempValue=usrNonLinearCalculate(g_NLCVideoBrightness,tempValue);
152 2
153 2 msAdjustBrightness(tempValue);
154 2 }
155 1 else
156 1 {
157 2 tempValue=DecIncValue(action, g_PcSetting.Brightness, MinDefBrightness, MaxDefBrightness, 1);
158 2 if (tempValue==g_PcSetting.Brightness)
159 2 return FALSE;
160 2 g_PcSetting.Brightness=tempValue;
161 2 msAdjustBrightness(g_PcSetting.Brightness);
162 2 }
163 1 return TRUE;
164 1 }
165
166 WORD GetBrightnessValue(void)
167 {
168 1 if(IsVideoPortInUse())
169 1 return g_VideoSetting.VideoBrightness; //GetScale100Value(g_PcSetting.Brightness, 0, 100);
170 1 else
171 1 return g_PcSetting.Brightness; //GetScale100Value(g_PcSetting.Brightness, 0, 100);
C51 COMPILER V8.01 MENUFUNC 11/28/2006 08:08:09 PAGE 4
172 1 }
173
174 //====================================================
175 #if 0
BOOL AdjustVideoHue(MenuItemActionType action)
{
WORD tempValue;
tempValue=DecIncValue(action, g_VideoSetting.VideoHue, MinDefVideoHue , MaxDefVideoHue, 1);
if (tempValue==g_VideoSetting.VideoHue)
return FALSE;
g_VideoSetting.VideoHue=tempValue;
msAdjustVideoHue(g_VideoSetting.VideoHue);
return TRUE;
}
#endif
189 //====================================================
190 BOOL AdjustVideoSaturation(MenuItemActionType action)
191 {
192 1 WORD tempValue;
193 1
194 1 tempValue=DecIncValue(action, g_VideoSetting.VideoSaturation, MinDefVideoSaturation , MaxDefVideoSatur
-ation, 1);
195 1 if (tempValue==g_VideoSetting.VideoSaturation)
196 1 return FALSE;
197 1 g_VideoSetting.VideoSaturation=tempValue;
198 1
199 1 tempValue=usrNonLinearCalculate(g_NLCVideoSaturation,g_VideoSetting.VideoSaturation);
200 1
201 1 msAdjustVideoSaturation(tempValue);
202 1 return TRUE;
203 1 }
204
205 WORD GetVideoSaturationValue(void)
206 {
207 1 return g_VideoSetting.VideoSaturation;
208 1 }
209
210
211
212 BOOL AdjustSource(void)
213 {
214 1 Power_TurnOffPanel();
215 1 msSetInterrupt(INTERRUPT_DISABLE);
216 1 msSetBlueScreen( _ENABLE, FR_BLUE);
*** ERROR C202 IN LINE 216 OF ..\..\MSFUNC\MENUFUNC.C: 'FR_BLUE': undefined identifier
217 1 g_VideoSetting.InputType+=1;
218 1 g_VideoSetting.InputType%=Input_Nums;
219 1 //printf("\r\nSource=%d",g_VideoSetting.InputType);
220 1 Set_InputTimingChangeFlag();
221 1 Clr_InputTimingStableFlag();
222 1
223 1 Osd_Hide();
224 1 Set_ShowSourceFlag();
225 1
226 1 #if TV_ENABLE
227 1 if (IsTVInUse())
228 1 Set_ChannelChangFlag();
229 1 #endif
230 1
231 1 msSetupInputPort();
C51 COMPILER V8.01 MENUFUNC 11/28/2006 08:08:09 PAGE 5
232 1 Set_SaveSettingFlag();
233 1 SaveUserPref();
234 1 return TRUE;
235 1 }
236
237
238 WORD GetChromaModeValue(void)
239 {
240 1 #if TV_ENABLE
241 1 if(IsTVInUse())
242 1 return ((g_TVChSetting.TvCurChannelMisc&ColorSysMask)>>4)%CHROMA_NUMS;
243 1 else
244 1 #endif
245 1 return (g_VideoSetting.VideoColorSys%=CHROMA_NUMS);
246 1 }
247
248 BOOL AdjustChromaMode(MenuItemActionType action)
249 {
250 1 #if TV_ENABLE
251 1 BYTE tempchroamvalue;
252 1 if(IsTVInUse())
253 1 {
254 2 tempchroamvalue=((g_TVChSetting.TvCurChannelMisc&ColorSysMask)>>4)%CHROMA_NUMS;
255 2 g_TVChSetting.TvCurChannelMisc &=~ColorSysMask;
256 2 if(action==MIA_IncValue)
257 2 tempchroamvalue+=1;
258 2 else
259 2 tempchroamvalue+=(CHROMA_NUMS-1);
260 2 tempchroamvalue %=CHROMA_NUMS;
261 2
262 2 g_TVChSetting.TvCurChannelMisc |=(tempchroamvalue<<4)&ColorSysMask;
263 2 chData.ucChannelMisc = g_TVChSetting.TvCurChannelMisc;
264 2 SaveTVChannelInfo(g_TVChSetting.ucCurChannelNO, TRUE);
265 2 }
266 1 else
267 1 #endif
268 1 {
269 2 if(action==MIA_IncValue)
270 2 g_VideoSetting.VideoColorSys+=1;
271 2 else
272 2 g_VideoSetting.VideoColorSys+=(CHROMA_NUMS-1);
273 2 g_VideoSetting.VideoColorSys %=CHROMA_NUMS;
274 2 }
275 1
276 1 SetChromaMode();
277 1 return TRUE;
278 1 }
279
280
281 WORD GetAudioVolumeValue(void)
282 {
283 1 return (g_VideoSetting.volume)%101;
284 1 }
285
286 void devAudioSetVolume(BYTE ucVolume)
287 {
288 1 BYTE tempValue;
289 1 if( ucVolume == 0 || g_VideoSetting.MuteStatus)
290 1 {
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -