📄 driver2.lst
字号:
C51 COMPILER V7.06 DRIVER2 09/17/2007 11:16:23 PAGE 1
C51 COMPILER V7.06, COMPILATION OF MODULE DRIVER2
OBJECT MODULE PLACED IN .\BIN\driver2.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE SRC\driver2.c OPTIMIZE(9,SPEED) DEBUG OBJECTEXTEND PRINT(.\LST\driver2.lst)
- OBJECT(.\BIN\driver2.obj)
stmt level source
1 #include "driver.h"
2 #include "ram.h"
3 #include "F63XREG.H"
4 #include "F63XDEF.H"
5 #include "MyDef.h"
6 #include "8051.H"
7 #include "STDIO.H"
8 #include "RAM.H"
9 #include "MCU.H"
10 //#include "MyDef.H"
11 #include "IIC.H"
12 //#include "F63XREG.H"
13 //#include "F63XDEF.H"
14 //#include "UserAdj.H"
15 #include "Scaler.H"
16 //#include "rom_map.h"
17 #include "AutoAdj.H"
18 //#include "OSD.H"
19 //#include "OSD_TAB.H"
20 #include "MODEHANDLE.H"
21 //#include "dvKeypad.h"
22 #include "PANEL.H"
23 void driver1()
24 {
25 1 short int cont=0,temp,i;
26 1 while((ReadCarStart())!=0)
27 1 {
28 2 CarBack();
29 2 }
30 1 CarStop();
31 1 temp = ScanKey();
32 1 while(temp == 12)
33 1 {if(i%2!=0)
34 2 {while((ReadCarend())!=0)
35 3 {
36 4 CarFront();
37 4 }
38 3 CarStop();
39 3 while((cont=AdcCont())!=120)
40 3 {
41 4 ScreenUp();
42 4 }
43 3 ScreenStop();
44 3 CarDirecte++;
45 3 temp = 0;
46 3 }
47 2 else
48 2 {
49 3 while((cont=AdcCont())!=120)
50 3 {
51 4 ScreenDown();
52 4 }
53 3 ScreenStop();
54 3
C51 COMPILER V7.06 DRIVER2 09/17/2007 11:16:23 PAGE 2
55 3 while((ReadCarStart())!=0)
56 3 {
57 4 CarBack();
58 4 }
59 3 CarStop();
60 3 CarDirecte--;
61 3 temp = 0;
62 3 }
63 2 }
64 1 }
65 unsigned int AdcCont()
66 {
67 1 // unsingned int cycl;
68 1 short int vel1,vel2;
69 1 ADC_CON=STRT_ADC|EN_ADC0;
70 1 while(CMP_ADC!=1)
71 1 {
72 2
73 2 }
74 1 vel1=ADC0_REG;
75 1 sleep(1);
*** WARNING C206 IN LINE 75 OF SRC\DRIVER2.C: 'sleep': missing function-prototype
*** ERROR C267 IN LINE 75 OF SRC\DRIVER2.C: 'sleep': requires ANSI-style prototype
76 1 while(((vel1-vel2)&0x7f)>8)
77 1 {
78 2 if(CMP_ADC==1)
79 2 {
80 3 vel2=ADC0_REG;
81 3 }
82 2 }
83 1 cycl++;
*** ERROR C202 IN LINE 83 OF SRC\DRIVER2.C: 'cycl': undefined identifier
84 1 return cycl;
*** ERROR C202 IN LINE 84 OF SRC\DRIVER2.C: 'cycl': undefined identifier
85 1 }
86 void ResetCar();
87 {
*** ERROR C141 IN LINE 87 OF SRC\DRIVER2.C: syntax error near '{'
88 while((ReadCarStart())!=0)
*** ERROR C141 IN LINE 88 OF SRC\DRIVER2.C: syntax error near '!=', expected ')'
89 {
90 CarBack();
*** ERROR C231 IN LINE 90 OF SRC\DRIVER2.C: 'CarBack': redefinition
91 }
*** ERROR C141 IN LINE 91 OF SRC\DRIVER2.C: syntax error near '}'
92 CarStop();
*** ERROR C231 IN LINE 92 OF SRC\DRIVER2.C: 'CarStop': redefinition
93 }
*** ERROR C141 IN LINE 93 OF SRC\DRIVER2.C: syntax error near '}'
94 bit ReadCarStart()
95 {
96 1 bit m;
97 1 Byte Port;
98 1 RDPA_REG |=PA6;
99 1 Port = PTA_REG;
100 1 if((Port & PA6)!=0)
101 1 {
102 2 m=1;
103 2 }
104 1 else
105 1 {
106 2 m=0;
C51 COMPILER V7.06 DRIVER2 09/17/2007 11:16:23 PAGE 3
107 2 }
108 1 return m;
109 1 }
110 bit ReadCarend()
111 {
112 1 bit m;
113 1 Byte Port;
114 1 RDPA_REG |=PA4;
115 1 Port = PTA_REG;
116 1 if((Port & PA4)!=0)
117 1 {
118 2 m=1;
119 2 }
120 1 else
121 1 {
122 2 m=0;
123 2 }
124 1 return m;
125 1 }
126 void CarBack()
127 {
128 1 Byte Port;
129 1 Port = PTA_REG;
130 1 Port |= RDPA_REG;
131 1 Port |= PA1;
132 1 PTA_REG = Port;
133 1
134 1 Port = PTA_REG;
135 1 Port |= RDPA_REG;
136 1 Port &= ~PA0;
137 1 PTA_REG = Port;
138 1 }
139 void CarStop()
140 {
141 1 Byte Port;
142 1 Port = PTA_REG;
143 1 Port |= RDPA_REG;
144 1 Port &= ~PA1;
145 1 PTA_REG = Port;
146 1
147 1 Port = PTA_REG;
148 1 Port |= RDPA_REG;
149 1 Port &= ~PA0;
150 1 PTA_REG = Port;
151 1 }
152 void CarFront()
153 {
154 1 Byte Port;
155 1 Port = PTA_REG;
156 1 Port |= RDPA_REG;
157 1 Port &= PA1;
158 1 PTA_REG = Port;
159 1
160 1 Port = PTA_REG;
161 1 Port |= RDPA_REG;
162 1 Port |= PA0;
163 1 PTA_REG = Port;
164 1 }
165 void ScreenUp()
166 {
167 1 Byte Port;
168 1 Port = PTA_REG;
C51 COMPILER V7.06 DRIVER2 09/17/2007 11:16:23 PAGE 4
169 1 Port |= RDPA_REG;
170 1 Port |= PA2;
171 1 PTA_REG = Port;
172 1
173 1 Port = PTA_REG;
174 1 Port |= RDPA_REG;
175 1 Port &= ~PA3;
176 1 PTA_REG = Port;
177 1 }
178 void ScreenStop()
179 {
180 1 Byte Port;
181 1 Port = PTA_REG;
182 1 Port |= RDPA_REG;
183 1 Port &= ~PA2;
184 1 PTA_REG = Port;
185 1
186 1 Port = PTA_REG;
187 1 Port |= RDPA_REG;
188 1 Port &= ~PA3;
189 1 PTA_REG = Port;
190 1 }
191 void ScreenDown()
192 {
193 1 Byte Port;
194 1 Port = PTA_REG;
195 1 Port |= RDPA_REG;
196 1 Port &= ~PA2;
197 1 PTA_REG = Port;
198 1
199 1 Port = PTA_REG;
200 1 Port |= RDPA_REG;
201 1 Port |= PA3;
202 1 PTA_REG = Port;
203 1 }
204
C51 COMPILATION COMPLETE. 1 WARNING(S), 9 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -