📄 lcd_msg.lst
字号:
C51 COMPILER V7.06 LCD_MSG 11/21/2005 13:47:29 PAGE 1
C51 COMPILER V7.06, COMPILATION OF MODULE LCD_MSG
OBJECT MODULE PLACED IN .\Output\Lcd_msg.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE Code\Lcd_msg.c OPTIMIZE(9,SPEED) BROWSE DEBUG OBJECTEXTEND CODE SYMBOLS PRI
-NT(.\Output\Lcd_msg.lst) PREPRINT(.\Output\Lcd_msg.i) OBJECT(.\Output\Lcd_msg.obj)
stmt level source
1 #define __MESSAGE__
2
3 #include "reg52.h"
4
5 #include "Header\MAIN_DEF.H"
6 #include "Header\CONFIG.H"
7 #include "Header\ACCESS.H"
8 #include "Header\LCD_FUNC.H"
9 #include "Header\LCD_MSG.H"
10 #include "Header\LCD_MAIN.H"
11 #include "Header\LCD_OSD.H"
12 #include "Header\MTV512.H"
13 #include "Header\OSD.H"
14 #include "Header\FONT.H"
15 #include "Header\SRC_CTRL.H"
16 #include "Header\FRAME_SYNC.H"
17 #include "Header\rgb_echo.H"
18
19 unsigned char GetKeyState(void)
20 {
21 1 /* //anson 050519
22 1 #if(MCU_TYPE == MCU_WINBOND)
23 1
24 1 unsigned char ucKeyState;
25 1
26 1 #if (BOARD_TYPE == QA_PCB || BOARD_TYPE == DEMO_LVDS_A || KINGMICE)
27 1
28 1 ucKeyState = bPOWER_KEY ? P3 | (IR_KEY_MASK | POWER_KEY_MASK) : (P3 | IR_KEY_MASK) & (0xff ^ POWER_KE
-Y_MASK);
29 1 #elif(BOARD_TYPE == DEMO1_PCB)
30 1 ucKeyState = bPOWER_KEY ? P1 | (IR_KEY_MASK | POWER_KEY_MASK) : (P1 | IR_KEY_MASK) & (0xff ^ POWER_KEY
-_MASK);
31 1 #else
32 1 ucKeyState = (P3 & 0x40) | (P1 & 0x1b) | IR_KEY_MASK;
33 1 #endif
34 1
35 1 #if (IRPOLLING)
36 1 {
37 1 // unsigned char ucIR_Curr;
38 1
39 1 // You cannot respond to ucIR_Cmd[0] when IR command decoding (1 < ucIR_State).
40 1 // Because ucIR_Cmd[0] is not a constant during command decoding.
41 1 Data[0] = (1 < ucIR_State) ? 0 : ucIR_Cmd[0];
42 1
43 1 if (Data[0])
44 1 {
45 1 switch (Data[0])
46 1 {
47 1 #if (POWER_KEY_TYPE == TYPE_ONE_TOUCH)
48 1 // Only when power-key is one-touch style, you can use IR remote controller to switch power on
-/off
49 1 case IR_POWER_KEY : ucKeyState &= (0xff ^ POWER_KEY_MASK); break;
50 1 #endif
51 1 // Use IR to implement standard key
C51 COMPILER V7.06 LCD_MSG 11/21/2005 13:47:29 PAGE 2
52 1 case IR_LEFT_KEY : ucKeyState &= (0xff ^ LEFT_KEY_MASK); break;
53 1 case IR_RIGHT_KEY : ucKeyState &= (0xff ^ RIGHT_KEY_MASK); break;
54 1 case IR_ENTER_KEY : ucKeyState &= (0xff ^ ENTER_KEY_MASK); break;
55 1 // Other IR function key
56 1 default :
57 1 ucKeyState &= (0xff ^ IR_KEY_MASK);
58 1
59 1 #if (TV_CHIP != TV_NONE)
60 1 switch (Data[0])
61 1 {
62 1 case IR_FUNC_SOURCE : Data[0] = NOTIFY_IR_SOURCE; break;
63 1 case IR_FUNC_DISP : Data[0] = NOTIFY_IR_DISP; break;
64 1 case IR_FUNC_JUMP : Data[0] = NOTIFY_IR_JUMP; break;
65 1 case IR_FUNC_CHDEC : Data[0] = NOTIFY_IR_CHDEC; break;
66 1 case IR_FUNC_CHINC : Data[0] = NOTIFY_IR_CHINC; break;
67 1 case IR_FUNC_VOLINC : Data[0] = NOTIFY_IR_VOLINC; break;
68 1 case IR_FUNC_VOLDEC : Data[0] = NOTIFY_IR_VOLDEC; break;
69 1 case IR_FUNC_MENU : Data[0] = NOTIFY_IR_MENU; break;
70 1 case IR_FUNC_ENTER : Data[0] = NOTIFY_IR_ENTER; break;
71 1 case IR_FUNC_MUTE : Data[0] = NOTIFY_IR_MUTE; break;
72 1 case IR_FUNC_NUM0 : Data[0] = NOTIFY_IR_NUM0; break;
73 1 case IR_FUNC_NUM1 : Data[0] = NOTIFY_IR_NUM1; break;
74 1 case IR_FUNC_NUM2 : Data[0] = NOTIFY_IR_NUM2; break;
75 1 case IR_FUNC_NUM3 : Data[0] = NOTIFY_IR_NUM3; break;
76 1 case IR_FUNC_NUM4 : Data[0] = NOTIFY_IR_NUM4; break;
77 1 case IR_FUNC_NUM5 : Data[0] = NOTIFY_IR_NUM5; break;
78 1 case IR_FUNC_NUM6 : Data[0] = NOTIFY_IR_NUM6; break;
79 1 case IR_FUNC_NUM7 : Data[0] = NOTIFY_IR_NUM7; break;
80 1 case IR_FUNC_NUM8 : Data[0] = NOTIFY_IR_NUM8; break;
81 1 case IR_FUNC_NUM9 : Data[0] = NOTIFY_IR_NUM9; break;
82 1 default : ucKeyState |= IR_KEY_MASK; break;
83 1 }
84 1 #endif
85 1 break;
86 1 }
87 1 }
88 1 }
89 1 #endif
90 1
91 1 return ((ucKeyState & ALL_KEY_MASK) | KEY_DISABLED) ^ ALL_KEY_MASK;
92 1 #else
93 1 */ //anson 050519
94 1 unsigned char ucKeyState=0;
95 1
96 1 if(!bRIGHT_KEY)
97 1 ucKeyState=ucKeyState|RIGHT_KEY_MASK;
98 1 if(!bLEFT_KEY)
99 1 ucKeyState=ucKeyState|LEFT_KEY_MASK;
100 1 if(!bENTER_KEY)
101 1 ucKeyState=ucKeyState|ENTER_KEY_MASK;
102 1 // if(!bMENU_KEY)
103 1 // ucKeyState=ucKeyState|MENU_KEY_MASK;
104 1 if(!bPOWER_KEY)
105 1 ucKeyState=ucKeyState|POWER_KEY_MASK;
106 1 if(!bAUTO_KEY)
107 1 ucKeyState=ucKeyState|AUTO_KEY_MASK;
108 1
109 1 return ucKeyState;
110 1
111 1 //#endif //anson 050519
112 1 }
113
C51 COMPILER V7.06 LCD_MSG 11/21/2005 13:47:29 PAGE 3
114 // Key_Trans() is used for generating key related messages, including OSD timout message.
115 // You can just issue the message or execute system default function, like changing input source.
116
117 // BE CAREFUL !! YOU CANNOT CHANGE ANY OSD STATUS REGISTERS OR CALL ANY OSD PROCESS HERE !!
118 // You should not expect OSD_Proc() can always receive your message.
119 // Because main program will shield OSD process from been triggered when input signal isn't stable,
120 // and terminate OSD process when input source is changed.
121 unsigned char Key_Trans()
122 {
123 1 static unsigned char idata ucP3_Prev = 0;
124 1 static unsigned char idata ucP3_Curr = 0;
125 1 static unsigned char idata ucKey_Repeat = 0;
126 1
127 1 unsigned char ucNotify = NOTIFY_NONE;
128 1
129 1 // Save the previous key status
130 1 ucP3_Prev = ucP3_Curr;
131 1 // Sample the current key status
132 1 ucP3_Curr = GetKeyState();
133 1
134 1 #if (POWER_KEY_TYPE == TYPE_TWO_STATE)
// We MUST handle power-key first.
if (bPower_Status)
{
if (ucP3_Curr & POWER_KEY_MASK)
ucP3_Curr ^= POWER_KEY_MASK; // Go further to handle other keys (and mask power-key)
else
{
Delay_Xms(20);
ucP3_Prev = ucP3_Curr;
ucP3_Curr = GetKeyState();
if (ucP3_Curr & POWER_KEY_MASK)
ucP3_Curr ^= POWER_KEY_MASK; // Go further to handle other keys (and mask power-key)
else
return NOTIFY_POWERDOWN;
}
}
else
{
if (ucP3_Curr & POWER_KEY_MASK)
{
ucKey_Issued = 0;
Delay_Xms(20);
ucP3_Prev = ucP3_Curr;
ucP3_Curr = GetKeyState();
if (ucP3_Curr & POWER_KEY_MASK)
return NOTIFY_POWERUP;
else
return NOTIFY_NONE;
}
else
return NOTIFY_NONE;
}
#else // POWER_KEY_TYPE is TYPE_ONE_TOUCH
174 1
175 1 if (bPower_Status)
C51 COMPILER V7.06 LCD_MSG 11/21/2005 13:47:29 PAGE 4
176 1 {
177 2 if (POWER_KEY_MASK & ucP3_Curr)
178 2 {
179 3 if ((ucP3_Prev ^ ucP3_Curr) & POWER_KEY_MASK)
180 3 {
181 4 Delay_Xms(20);
182 4
183 4 ucP3_Curr = GetKeyState();
184 4
185 4 if ((ucP3_Prev ^ ucP3_Curr) & POWER_KEY_MASK)
186 4 {
187 5 if(((stGUD3.TV_SETTING & 0x08)==0x08) || ((stGUD3.TV_SETTING & 0x20)==0x20 )) //anson
188 5 {
189 6 stGUD3.TV_SETTING &= 0xF7 ; //anson Factory bit=0
190 6 Save_GUD3(); //anson
191 6 }
192 5 return NOTIFY_POWERDOWN;
193 5 }
194 4 else
195 4 return NOTIFY_NONE;
196 4 }
197 3 }
198 2 }
199 1 else
200 1 {
201 2 if ((RIGHT_KEY_MASK| POWER_KEY_MASK ) == ucP3_Curr) //anson
202 2 {
203 3 stGUD3.TV_SETTING |= 0x08;//Factory mode
204 3 Save_GUD3();
205 3 return NOTIFY_POWERUP;
206 3 }
207 2
208 2 else if ((MODE_NOSIGNAL == ucMode_Curr) &&((LEFT_KEY_MASK | POWER_KEY_MASK) == ucP3_Curr)) //anson
209 2 { //ucNotify = NOTIFY_BURNIN_KEY;
210 3 stGUD3.TV_SETTING = stGUD3.TV_SETTING | 0x20; //Burning Mode
211 3 Save_GUD3();
212 3 return NOTIFY_POWERUP;
213 3 }
214 2
215 2 else if (POWER_KEY_MASK & ucP3_Curr)
216 2 {
217 3 if ((ucP3_Prev ^ ucP3_Curr) & POWER_KEY_MASK)
218 3 {
219 4 ucKey_Issued = 0;
220 4
221 4 Delay_Xms(20);
222 4
223 4 ucP3_Curr = GetKeyState();
224 4
225 4 if ((ucP3_Prev ^ ucP3_Curr) & POWER_KEY_MASK)
226 4 return NOTIFY_POWERUP;
227 4 else
228 4 return NOTIFY_NONE;
229 4 }
230 3 else
231 3 return NOTIFY_NONE;
232 3 }
233 2 }
234 1
235 1 #endif
236 1
237 1 // Generate Key Messages
C51 COMPILER V7.06 LCD_MSG 11/21/2005 13:47:29 PAGE 5
238 1 switch (ucP3_Curr)
239 1 {
240 2 ///////////////////////////////////////////////////////////////////////////////////
241 2 //anson
242 2 ///////////////////////////////////////////////////////////////////////////////////
243 2
244 2 case FACTORY_KEY_MASK : //anson 0921
245 2 if ((ucP3_Prev ^ ucP3_Curr) & FACTORY_KEY_MASK)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -