📄 keyfuncx.lst
字号:
C51 COMPILER V7.07 KEYFUNCX 05/17/2006 03:13:55 PAGE 1
C51 COMPILER V7.07, COMPILATION OF MODULE KEYFUNCX
OBJECT MODULE PLACED IN .\Output\KeyFuncX.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE KeyFuncX.c BROWSE DEBUG OBJECTEXTEND PRINT(.\LST\KeyFuncX.lst) OBJECT(.\Out
-put\KeyFuncX.obj)
stmt level source
1 //#include <at89x52.H> // SFR definition header file
2 #include <reg54.h>
3 #include <stdio.h> // prototype declarations for I/O functions
4 #include <rtx51tny.h> /* RTX-51 tiny functions & defines */
5 #include "function.h"
6 #include "SystemEvent.h"
7 #include "UART.h"
8 #include "ExtVar.h"
9 #include "RTOS.h"
10 #include "string.h"
11
12 code unsigned char _Str1[]={"Run HDMIDemo0. "};
13
14 code unsigned char _Str2[]={"Finish... "};
15
16 code unsigned char _Str3[]={"Continue. "};
17
18 code unsigned char _Str4[]={"Break. "};
19
20 code unsigned char _DemoItemsCount[8]={
21 1,3,4,2,2,3,3,6/*,3,5,3*/};
22
23 //unsigned char _StateFlag=_Initiate;
24
25 void RunAL720DemoX(unsigned char _DemoType,unsigned char _DemoIndeX);
26
27 code unsigned char *_DemoXLabel[]={
28 "0.Init ",
29 "1.H/V sync detect ",
30 "2.IR detect ",
31 "3.Input select ",
32 "4.Read EDID VGA ",
33 "5.Read EDID HDMI ",
34 "6.I2C read ",
35 "7.I2C write "
36 /*
37 "8.Set data length ",
38 "9.Read I2C ",
39 "a.Write I2C "
40 */
41 };
42
43 //"1.H/V sync detect ",
44 #define _H_freq 0
45 #define _V_freq 1
46 #define _Video_mode 2
47 #define _Quad_4_1_CS 3
48
49 code unsigned char *_Demo0Label[]={
50 "a.H freq ",
51 "b.V freq ",
52 "c.Video mode",
53 "Exit "
54 };
C51 COMPILER V7.07 KEYFUNCX 05/17/2006 03:13:55 PAGE 2
55
56 //"2.IR detect ",
57 #define _16ChMonitor 0
58 #define _13ChMonitor 1
59 #define _9ChMonitor 2
60 #define _6ChMonitor 3
61 #define _4ChMonitor 4
62 #define _1x2ChMonitor 5
63 #define _2x1ChMonitor 6
64 #define _1ChMonitor 7
65
66
67 code unsigned char *_Demo1Label[]={
68 "a.Capture code ",
69 "b.Length of code",
70 "c.decoding ",
71 "d.Reset ",
72 "Exit "
73 };
74
75 //"3.Input select",
76 #define _Quad 0
77 #define _Quad4Pip 1
78 #define _Full1Pip 2
79
80
81 code unsigned char *_Demo2Label[]={
82 "a.VGA ",
83 "b.HDMI ",
84 "Exit "
85 };
86
87 //"4.Read EDID VGA ",
88 #define _ShowOSD_A 0
89 #define _ShowOSD_B 1
90
91 code unsigned char *_Demo3Label[]={
92 "a.check sum ",
93 "b.Browse ",
94 "Exit "
95 };
96
97 //"5.Read EDID HDMI ",
98 #define _4Live_MultPlayBack 0
99 #define _4Live_PopPlayBack 1
100 #define _4Live_QuadPlayBack 2
101
102 code unsigned char *_Demo4Label[]={
103 "a.check sum ",
104 "b.Browse ",
105 "Exit "
106 };
107
108 //"6.I2C read ",
109 code unsigned char *_Demo5Label[]={
110 "a.ID? ",
111 "b.Sub address ",
112 "c.Browse ",
113 "Exit "
114 };
115
116 #define _Full_V1_PIP_V2 0
C51 COMPILER V7.07 KEYFUNCX 05/17/2006 03:13:55 PAGE 3
117 #define _Full_V2_PIP_V1 1
118 #define _V2_XMirror_PIP_V1 2
119 #define _V2FlipPIP_V1 3
120 #define _V2_YFlip_PIP_V1 4
121 #define _V2_PIP_V1 5
122
123 //"6.I2C write ",
124 code unsigned char *_Demo6Label[]={
125 "a.ID? ",
126 "b.Sub address ",
127 "c.Set data ",
128 "Exit "
129 };
130
131
132 #define _Demo_Init 0x00
133 #define _Demo_0 1
134 #define _Demo_1 2
135 #define _Demo_2 3
136 #define _Demo_3 4
137 #define _Demo_4 5
138 #define _Demo_5 6
139 #define _Demo_6 7
140 #define _Demo_7 8
141 /*
142 #define _Demo_8 9
143 #define _Demo_9 0x0a
144 */
145
146 sbit _Key_In=P1^4;
147
148 unsigned int ButtomKeyDetect(void){
149 1 unsigned char _gx;
150 1 //
151 1 _Key_In=0;
152 1
153 1 P1=0xf0;
154 1 _gx=P1;
155 1 _gx&=0xf0;
156 1
157 1 _Key_In=1;
158 1
159 1 if(_gx!=0xf0) return(_KeyPress);
160 1 else return(_KeyRelease);
161 1 }
162
163 unsigned char DetectButtomKey(void){
164 1 unsigned char _ax;
165 1 _Key_In=0;
166 1 P1=0xf0;
167 1 _ax=P1;
168 1 _ax&=0xf0;
169 1 _Key_In=1;
170 1 return(_ax);
171 1 }
172
173
174 void ShowAL720DemoX(unsigned char _DemoTypeX,unsigned char _DemoIndexX){
175 1
176 1 if(_DemoIndexX==0){
177 2 PrintAString(" ",20,0x00);
178 2 PrintAString(_DemoXLabel[_DemoTypeX],18,0x00);
C51 COMPILER V7.07 KEYFUNCX 05/17/2006 03:13:55 PAGE 4
179 2 }
180 1
181 1 PrintAString(" ",20,0x40);
182 1
183 1 switch(_DemoTypeX){
184 2 case _Demo_Init:
185 2
186 2 break;
187 2 case _Demo_0:
188 2
189 2 PrintAString(_Demo0Label[_DemoIndexX],14,0x40);
190 2 break;
191 2 case _Demo_1:
192 2
193 2 PrintAString(_Demo1Label[_DemoIndexX],14,0x40);
194 2 break;
195 2 case _Demo_2:
196 2
197 2 PrintAString(_Demo2Label[_DemoIndexX],10,0x40);
198 2 break;
199 2 case _Demo_3:
200 2
201 2 PrintAString(_Demo3Label[_DemoIndexX],11,0x40);
202 2 break;
203 2 case _Demo_4:
204 2
205 2 PrintAString(_Demo4Label[_DemoIndexX],20,0x40);
206 2 break;
207 2 case _Demo_5:
208 2
209 2 PrintAString(_Demo5Label[_DemoIndexX],12,0x40);
210 2 break;
211 2 case _Demo_6:
212 2
213 2 PrintAString(_Demo6Label[_DemoIndexX],19,0x40);
214 2 break;
215 2
216 2
217 2 }
218 1
219 1 }
220
221
222 void SelectAL720DemoX(unsigned char _DemoTypeX){
223 1 PrintTestPage();
224 1 PrintAString(" ",20,0x40);
225 1 PrintAString(_DemoXLabel[_DemoTypeX],18,0x40);
226 1 }
227
228 //idata unsigned char _dx[0x0a];
229
230 extern void InitSERIALPort(void);
231 extern idata unsigned int _vx;
232 void FunctionDispatch(unsigned char _charx){
233 1 unsigned char _dx;
234 1 PrintAString(" ",16,0x40);
235 1 switch(_charx){
236 2 /*
237 2 case 0x00: // up
238 2
239 2 switch(_KeyPressLevel){
240 2 case 0:
C51 COMPILER V7.07 KEYFUNCX 05/17/2006 03:13:55 PAGE 5
241 2 if(_DemoType<0x07) _DemoType++;
242 2 else _DemoType=0;
243 2 _DemoIndeX=0;
244 2 SelectAL720DemoX(_DemoType);
245 2 break;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -