?? menu.lst
字號:
C51 COMPILER V8.18 MENU 09/29/2009 23:58:03 PAGE 1
C51 COMPILER V8.18, COMPILATION OF MODULE MENU
OBJECT MODULE PLACED IN ..\..\1out\menu.obj
COMPILER INVOKED BY: d:\Keil\C51\BIN\C51.EXE ..\..\msFunc\menu.c BROWSE INCDIR(..\..\inc) DEBUG OBJECTEXTEND PRINT(..\..
-\1out\menu.lst) OBJECT(..\..\1out\menu.obj)
line level source
1 #define _MENU_C_
2
3 #include <stdlib.h>
4 #include <string.h>
5 #include "types.h"
6 #include "board.h"
7 #include "global.h"
8 #include "keypaddef.h"
9 #include "menu.h"
10 //#include "menudef.h"
11 #include "keypad.h"
12 #include "ms_rwreg.h"
13 #include "msosd.h"
14 #include "menufunc.h"
15 #include "menustr.h"
16 #include "menutbl.h"
17 #include "ms_reg.h"
18 #include "DEBUG.h"
19 #include "misc.h"
20 #include "nvram.h"
21 #include "adjust.h"
22 #include "userpref.h"
23 #include "ir.h"
24 #include "tv.h"
25 #include "power.h"
26 #include "tda7052.h"
*** WARNING C236 IN LINE 13 OF ..\..\INC\TDA7052.H: 'usrNonLinearCalculate': different length of parameter lists
27 #include "panel.h"
28 #include "mstar.h"
29 #include "DevVD.h"
30 #include "menufunc.h"
31 #include "irfunc.h"
32
33 #define CurrentMenu tblMenus[g_ucMenuPageIndex]
34 #define PrevMenuPage CurrentMenu.PrevPage
35 #define CurrentMenuItems CurrentMenu.MenuItems
36 #define MenuItemCount CurrentMenu.ItemCount
37 #define CurrentMenuTimeOut CurrentMenu.TimeOut
38
39 #define CurrentMenuItem CurrentMenu.MenuItems[g_ucMenuItemIndex]
40 #define NextMenuPage CurrentMenuItem.NextPage
41 #define CurrentMenuItemFunc CurrentMenuItem.KeyFunction
42 //#define KeyEvent CurrentMenuItem.KeyEvents[KeypadButton]
43
44 //========================================================================
45 BOOL ResetOsdTimer(void)
46 {
47 1 BYTE tempValue=g_VideoSetting.OsdTime;
48 1
49 1 if (!FactoryModeFlag)
50 1 {
51 2 if (tempValue==0)
52 2 g_ucOsdCounter=5;
53 2 else if (tempValue==1)
C51 COMPILER V8.18 MENU 09/29/2009 23:58:03 PAGE 2
54 2 g_ucOsdCounter=10;
55 2 else if (tempValue==2)
56 2 g_ucOsdCounter=30;
57 2 else
58 2 g_ucOsdCounter=60;
59 2 }
60 1 if(CurrentMenuTimeOut & mtbIndividualTimeOut)
61 1 g_ucOsdCounter = CurrentMenuTimeOut& ~mtbIndividualTimeOut;//Vick :Disable OSD timer out
62 1
63 1 Clr_OsdTimeoutFlag();
64 1 return TRUE;
65 1 }
66
67 void Menu_InitVariable(void)
68 {
69 1 if (PowerOnFlag)
70 1 g_ucMenuPageIndex=RootMenu;
71 1 else
72 1 g_ucMenuPageIndex=PowerOffMenu;
73 1
74 1 g_ucMenuItemIndex=0;
75 1 g_ucOsdCounter=0;
76 1 }
77
78 void Menu_OsdHandler(void)
79 {
80 1 #ifdef IR_DEBUG_EN
DebugIRHandler();
#endif
83 1
84 1 Key_ScanKeypad();
85 1 irDecodeCommand();
86 1 #if TV_ENABLE
87 1 irDecodeNumKey();
88 1 #endif
89 1
90 1 if (OsdTimeoutFlag)
91 1 {
92 2 Clr_OsdTimeoutFlag();
93 2 if (g_ucMenuPageIndex>RootMenu)
94 2 {
95 3 g_ucMenuPageIndex=RootMenu;
96 3 g_ucMenuItemIndex=0;
97 3 ExecuteKeyEvent(MIA_RedrawMenu);
98 3 }
99 2 SaveUserPref();
100 2 }
101 1 }
102
103
104 #define ucHoldCount 10
105 #define ucRptCount 1
106 void EventProcess(BYTE ucKeyCode)
107 {
108 1 BYTE ucEvent = MIA_Nothing;
109 1
110 1 g_ucKeyRptCount = 0;
111 1 g_ucNextRptCount = ucHoldCount ;
112 1 if ((CurrentMenuItem.KeyEvents[ucKeyCode].cConditions & INPUT_PRESS)&&(CurrentMenuItem.KeyEvents[ucKey
-Code].InputType&1<<g_VideoSetting.InputType))
113 1 {
114 2 ucEvent = CurrentMenuItem.KeyEvents[ucKeyCode].PressKeyEvent;
C51 COMPILER V8.18 MENU 09/29/2009 23:58:03 PAGE 3
115 2 }
116 1 MenuProcessKey(ucEvent);
117 1 }
118
119
120 void EventRepeatProcess(BYTE ucKeyCode, BYTE ucTicks)
121 {
122 1 BYTE ucEvent = MIA_Nothing;
123 1
124 1 if ((CurrentMenuItem.KeyEvents[ucKeyCode].cConditions & INPUT_HOLD)&&(CurrentMenuItem.KeyEvents[ucKeyC
-ode].InputType&1<<g_VideoSetting.InputType))
125 1 {
126 2 g_ucKeyRptCount++;
127 2 if (g_ucKeyRptCount >= (g_ucNextRptCount * ucTicks))
128 2 {
129 3 ucEvent = CurrentMenuItem.KeyEvents[ucKeyCode].PressKeyEvent;
130 3 g_ucKeyRptCount = 0;
131 3 g_ucNextRptCount = ucRptCount;
132 3 }
133 2 }
134 1
135 1 MenuProcessKey(ucEvent);
136 1 }
137
138 void MenuProcessKey(BYTE menuAction)
139 {
140 1 if (menuAction)
141 1 {
142 2 if(!PowerOnFlag)
143 2 {
144 3 if (menuAction!=MIA_Power)
145 3 menuAction=MIA_Nothing;
146 3 }
147 2 if (ExecuteKeyEvent(menuAction))
148 2 {
149 3 ResetOsdTimer();
150 3 Clr_OsdTimeoutFlag();
151 3 }
152 2 }
153 1 }
154
155 #if TV_ENABLE
156 void irAdjustNumKey(BYTE ucPressNum)
157 {
158 1 if (g_bIrNumKeyStart == 0)
159 1 {
160 2 g_ucIrNumKey = ucPressNum;
161 2 g_bIrNumKeyStart = 1;
162 2 g_bIrKeyNumEnd = 0;
163 2 if (g_bIr100Key)
164 2 {
165 3 g_IrCodeParam[0] = ucPressNum + OSD_0_INDEX;
166 3 g_IrCodeParam[1] = '-';
167 3 g_IrCodeParam[2] = '\0';
168 3 }
169 2 else
170 2 {
171 3 g_IrCodeParam[0] = ' ';
172 3 g_IrCodeParam[1] = ucPressNum + OSD_0_INDEX;
173 3 g_IrCodeParam[2] = '\0';
174 3 g_bIrKeyNumEnd = 1;
175 3 g_bIrNumKeyStart = 0;
C51 COMPILER V8.18 MENU 09/29/2009 23:58:03 PAGE 4
176 3 }
177 2 g_ucMenuPageIndex = TVInputNumMenu;
178 2 g_ucMenuItemIndex = 0;
179 2 g_ucOsdCounter = 5;
180 2 }
181 1 else
182 1 {
183 2 g_ucIrNumKey = (g_ucIrNumKey * 10) + ucPressNum; // calculate key number
184 2
185 2 g_ucMenuPageIndex = TVInputNumMenu;
186 2 g_ucMenuItemIndex = 0;
187 2 g_ucOsdCounter = 5;
188 2 g_bIrNumKeyStart = 0;
189 2 g_bIrKeyNumEnd = 1; // ready to change channel
190 2 }
191 1 }
192
193 void irNumInputMode(void)
194 {
195 1 if (g_bIr100Key == 0)
196 1 {
197 2 g_bIr100Key = 1;
198 2 g_ucIrNumKey = 0; // clear IR key
199 2
200 2 g_IrCodeParam[0] = '-';
201 2 g_IrCodeParam[1] = '-';
202 2 g_IrCodeParam[2] = '\0';
203 2 g_ucMenuPageIndex = TVInputNumMenu;
204 2 g_ucMenuItemIndex = 0;
205 2 Osd_Hide();
206 2 g_ucOsdCounter = 5;
207 2 }
208 1 else
209 1 {
210 2 g_bIr100Key = 0;
211 2 g_ucIrNumKey = 0; // clear IR key
212 2
213 2 g_IrCodeParam[0] = '-';
214 2 g_IrCodeParam[1] = ' ';
215 2 g_IrCodeParam[2] = '\0';
216 2 g_ucMenuPageIndex = TVInputNumMenu;
217 2 g_ucMenuItemIndex = 0;
218 2 Osd_Hide();
219 2 g_ucOsdCounter = 5;
220 2 }
221 1 }
222
223 BYTE IRKeyToNumber( MenuItemActionType ucCode )
224 {
225 1 switch( ucCode )
226 1 {
227 2 case MIA_IRKEY_0: return 0;
228 2 case MIA_IRKEY_1: return 1;
229 2 case MIA_IRKEY_2: return 2;
230 2 case MIA_IRKEY_3: return 3;
231 2 case MIA_IRKEY_4: return 4;
232 2 case MIA_IRKEY_5: return 5;
233 2 case MIA_IRKEY_6: return 6;
234 2 case MIA_IRKEY_7: return 7;
235 2 case MIA_IRKEY_8: return 8;
236 2 case MIA_IRKEY_9: return 9;
237 2 }
C51 COMPILER V8.18 MENU 09/29/2009 23:58:03 PAGE 5
238 1 return 0xFF;
239 1 }
240 #endif
241
242 BOOL ExecuteKeyEvent(MenuItemActionType menuAction)
243 { BOOL processEvent=TRUE;
244 1 BYTE tempValue;
245 1
246 1 while (processEvent)
247 1 {
248 2 processEvent=FALSE;
249 2 //printMsg("keypress");
250 2 if (g_bTVAutoScanChannelEnable || g_bTVManualSearchEnable)
251 2 {
252 3 g_bTVAutoScanChannelBreak = TRUE;
253 3 g_bTVManualScanChannelBreak= TRUE;
254 3 return TRUE;
255 3 }
256 2
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -