📄 lcd_msg.lst
字号:
C51 COMPILER V6.20c LCD_MSG 04/15/2004 12:59:11 PAGE 1
C51 COMPILER V6.20c, 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 PRINT(.\Output\L
-cd_msg.lst) 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
18 unsigned char GetKeyState(void)
19 {
20 1 unsigned char ucKeyState = 0;
21 1
22 1 #if (MCU_TYPE == MCU_STD8051)
23 1
24 1 #if (BOARD_TYPE == QA_PCB || BOARD_TYPE == DEMO_LVDS_A || KINGMICE)
25 1 ucKeyState = bPOWER_KEY ? P3 | (IR_KEY_MASK | POWER_KEY_MASK) : (P3 | IR_KEY_MASK) & (0xff ^ POWER_KE
-Y_MASK);
26 1 #elif (BOARD_TYPE == DEMO1_PCB)
ucKeyState = bPOWER_KEY ? P1 | (IR_KEY_MASK | POWER_KEY_MASK) : (P1 | IR_KEY_MASK) & (0xff ^ POWER_KE
-Y_MASK);
#else
// ucKeyState = (P3 & 0x78) | (P2 & 0x02) | IR_KEY_MASK;
ucKeyState = (P3 & 0x40) | (P1 & 0x1b) | IR_KEY_MASK;
#endif
32 1
33 1 #if (IRPOLLING)
{
// unsigned char ucIR_Curr;
// You cannot respond to ucIR_Cmd[0] when IR command decoding (1 < ucIR_State).
// Because ucIR_Cmd[0] is not a constant during command decoding.
Data[0] = (1 < ucIR_State) ? 0 : ucIR_Cmd[0];
if (Data[0])
{
switch (Data[0])
{
#if (POWER_KEY_TYPE == TYPE_ONE_TOUCH)
// Only when power-key is one-touch style, you can use IR remote controller to switch power on
-/off
case IR_POWER_KEY : ucKeyState &= (0xff ^ POWER_KEY_MASK); break;
#endif
// Use IR to implement standard key
case IR_LEFT_KEY : ucKeyState &= (0xff ^ LEFT_KEY_MASK); break;
case IR_RIGHT_KEY : ucKeyState &= (0xff ^ RIGHT_KEY_MASK); break;
C51 COMPILER V6.20c LCD_MSG 04/15/2004 12:59:11 PAGE 2
case IR_ENTER_KEY : ucKeyState &= (0xff ^ ENTER_KEY_MASK); break;
// Other IR function key
default :
ucKeyState &= (0xff ^ IR_KEY_MASK);
#if (TV_CHIP != TV_NONE)
switch (Data[0])
{
case IR_FUNC_SOURCE : Data[0] = NOTIFY_IR_SOURCE; break;
case IR_FUNC_DISP : Data[0] = NOTIFY_IR_DISP; break;
case IR_FUNC_JUMP : Data[0] = NOTIFY_IR_JUMP; break;
case IR_FUNC_CHDEC : Data[0] = NOTIFY_IR_CHDEC; break;
case IR_FUNC_CHINC : Data[0] = NOTIFY_IR_CHINC; break;
case IR_FUNC_VOLINC : Data[0] = NOTIFY_IR_VOLINC; break;
case IR_FUNC_VOLDEC : Data[0] = NOTIFY_IR_VOLDEC; break;
case IR_FUNC_MENU : Data[0] = NOTIFY_IR_MENU; break;
case IR_FUNC_ENTER : Data[0] = NOTIFY_IR_ENTER; break;
case IR_FUNC_MUTE : Data[0] = NOTIFY_IR_MUTE; break;
case IR_FUNC_NUM0 : Data[0] = NOTIFY_IR_NUM0; break;
case IR_FUNC_NUM1 : Data[0] = NOTIFY_IR_NUM1; break;
case IR_FUNC_NUM2 : Data[0] = NOTIFY_IR_NUM2; break;
case IR_FUNC_NUM3 : Data[0] = NOTIFY_IR_NUM3; break;
case IR_FUNC_NUM4 : Data[0] = NOTIFY_IR_NUM4; break;
case IR_FUNC_NUM5 : Data[0] = NOTIFY_IR_NUM5; break;
case IR_FUNC_NUM6 : Data[0] = NOTIFY_IR_NUM6; break;
case IR_FUNC_NUM7 : Data[0] = NOTIFY_IR_NUM7; break;
case IR_FUNC_NUM8 : Data[0] = NOTIFY_IR_NUM8; break;
case IR_FUNC_NUM9 : Data[0] = NOTIFY_IR_NUM9; break;
default : ucKeyState |= IR_KEY_MASK; break;
}
#endif
break;
}
}
}
#endif
88 1
89 1 return ((ucKeyState & ALL_KEY_MASK) | KEY_DISABLED) ^ ALL_KEY_MASK;
90 1
91 1 #else
if (!bRIGHT_KEY)
ucKeyState = ucKeyState | RIGHT_KEY_MASK;
if (!bLEFT_KEY)
ucKeyState = ucKeyState | LEFT_KEY_MASK;
if (!bENTER_KEY)
ucKeyState = ucKeyState | ENTER_KEY_MASK;
if (!bMENU_KEY)
ucKeyState = ucKeyState | MENU_KEY_MASK;
if (!bPOWER_KEY)
ucKeyState = ucKeyState | POWER_KEY_MASK;
return ucKeyState;
#endif
107 1 }
108
109 // Key_Trans() is used for generating key related messages, including OSD timout message.
110 // You can just issue the message or execute system default function, like changing input source.
111
112 // BE CAREFUL !! YOU CANNOT CHANGE ANY OSD STATUS REGISTERS OR CALL ANY OSD PROCESS HERE !!
113 // You should not expect OSD_Proc() can always receive your message.
C51 COMPILER V6.20c LCD_MSG 04/15/2004 12:59:11 PAGE 3
114 // Because main program will shield OSD process from been triggered when input signal isn't stable,
115 // and terminate OSD process when input source is changed.
116 unsigned char Key_Trans()
117 {
118 1 static unsigned char idata ucP3_Prev = 0;
119 1 static unsigned char idata ucP3_Curr = 0;
120 1 static unsigned char idata ucKey_Repeat = 0;
121 1
122 1 unsigned char ucNotify = NOTIFY_NONE;
123 1
124 1 // Save the previous key status
125 1 ucP3_Prev = ucP3_Curr;
126 1 // Sample the current key status
127 1 ucP3_Curr = GetKeyState();
128 1
129 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
169 1
170 1 if (bPower_Status)
171 1 {
172 2 if (POWER_KEY_MASK & ucP3_Curr)
173 2 {
174 3 if ((ucP3_Prev ^ ucP3_Curr) & POWER_KEY_MASK)
175 3 {
C51 COMPILER V6.20c LCD_MSG 04/15/2004 12:59:11 PAGE 4
176 4 Delay_Xms(20);
177 4
178 4 ucP3_Curr = GetKeyState();
179 4
180 4 if ((ucP3_Prev ^ ucP3_Curr) & POWER_KEY_MASK)
181 4 return NOTIFY_POWERDOWN;
182 4 else
183 4 return NOTIFY_NONE;
184 4 }
185 3 }
186 2 }
187 1 else
188 1 {
189 2 if (POWER_KEY_MASK & ucP3_Curr)
190 2 {
191 3 if ((ucP3_Prev ^ ucP3_Curr) & POWER_KEY_MASK)
192 3 {
193 4 ucKey_Issued = 0;
194 4
195 4 Delay_Xms(20);
196 4
197 4 ucP3_Curr = GetKeyState();
198 4
199 4 if ((ucP3_Prev ^ ucP3_Curr) & POWER_KEY_MASK)
200 4 return NOTIFY_POWERUP;
201 4 else
202 4 return NOTIFY_NONE;
203 4 }
204 3 else
205 3 return NOTIFY_NONE;
206 3 }
207 2 }
208 1
209 1 #endif
210 1
211 1 // Generate Key Messages
212 1 switch (ucP3_Curr)
213 1 {
214 2 case MENU_KEY_MASK :
215 2 if ((ucP3_Prev ^ ucP3_Curr) & MENU_KEY_MASK)
216 2 {
217 3 ucKey_Issued = 0;
218 3 ucNotify = NOTIFY_MENU_KEY;
219 3 }
220 2 break;
221 2
222 2 case ENTER_KEY_MASK :
223 2 if ((ucP3_Prev ^ ucP3_Curr) & ENTER_KEY_MASK)
224 2 {
225 3 ucKey_Issued = 0;
226 3
227 3 //usOSD_Timer = (unsigned int)stGUD1.OSD_TIMEOUT << 9; // Reset OSD timeout timer
228 3 usOSD_Timer = (unsigned int)stGUD1.OSD_TIMEOUT * 51;
229 3 ucNotify = NOTIFY_ENTER_KEY; // Post enter-key pressed message
230 3 ucKey_Repeat = KEY_REPEAT_COUNT * 8;
231 3 }
232 2 else
233 2 {
234 3 if (ucKey_Repeat)
235 3 ucKey_Repeat -= 1;
236 3 else
237 3 {
C51 COMPILER V6.20c LCD_MSG 04/15/2004 12:59:11 PAGE 5
238 4 if (ucOSD_Page_Index)
239 4 {
240 5 usOSD_Timer = 0;
241 5 ucNotify = NOTIFY_CLEAR_OSD;
242 5 }
243 4 }
244 3 }
245 2 break;
246 2
247 2 case RIGHT_KEY_MASK :
248 2 case LEFT_KEY_MASK:
249 2
250 2 //usOSD_Timer = (unsigned int)stGUD1.OSD_TIMEOUT << 9; // Reset OSD timeout timer
251 2 usOSD_Timer = (unsigned int)stGUD1.OSD_TIMEOUT * 51;
252 2
253 2 if ((ucP3_Prev ^ ucP3_Curr) & ucP3_Curr)
254 2 {
255 3 ucKey_Issued = 0;
256 3
257 3 ucNotify = (ucP3_Curr == RIGHT_KEY_MASK) ? NOTIFY_RIGHT_KEY : NOTIFY_LEFT_KEY; // Post
- right-key pressed message
258 3 ucKey_Repeat = KEY_REPEAT_COUNT;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -