📄 vpc3230.lst
字号:
*** ERROR C202 IN LINE 144 OF VPC3230.C: 'VPC3230D_A_ADDR': undefined identifier
145 1 VPC_Set_2Byte(VPC3230D_A_ADDR, 0x26, 0x00, 0x00);
*** ERROR C202 IN LINE 145 OF VPC3230.C: 'VPC3230D_A_ADDR': undefined identifier
146 1 VPC_Set_2Byte(VPC3230D_A_ADDR, 0x27, 0x00, 0x22);
*** ERROR C202 IN LINE 146 OF VPC3230.C: 'VPC3230D_A_ADDR': undefined identifier
147 1 VPC_Set_2Byte(VPC3230D_A_ADDR, 0x28, 0x00, 0x72);
*** ERROR C202 IN LINE 147 OF VPC3230.C: 'VPC3230D_A_ADDR': undefined identifier
148 1 VPC_Set_2Byte(VPC3230D_A_ADDR, 0x29, 0x03, 0x56);
*** ERROR C202 IN LINE 148 OF VPC3230.C: 'VPC3230D_A_ADDR': undefined identifier
149 1 VPC_FP_Wrt (VPC3230D_A_ADDR, 0x0148,0x0000);
*** ERROR C202 IN LINE 149 OF VPC3230.C: 'VPC3230D_A_ADDR': undefined identifier
150 1 VPC_FP_Wrt (VPC3230D_A_ADDR, 0x0042,0x02d0);
*** ERROR C202 IN LINE 150 OF VPC3230.C: 'VPC3230D_A_ADDR': undefined identifier
151 1 VPC_FP_Wrt (VPC3230D_A_ADDR, 0x0043,0x0600);
*** ERROR C202 IN LINE 151 OF VPC3230.C: 'VPC3230D_A_ADDR': undefined identifier
152 1 VPC_FP_Wrt (VPC3230D_A_ADDR, 0x0040,0x0000);
*** ERROR C202 IN LINE 152 OF VPC3230.C: 'VPC3230D_A_ADDR': undefined identifier
C51 COMPILER V7.07 VPC3230 05/03/2006 14:00:56 PAGE 5
153 1 VPC_FP_Wrt (VPC3230D_A_ADDR, 0x0069,0x002a);
*** ERROR C202 IN LINE 153 OF VPC3230.C: 'VPC3230D_A_ADDR': undefined identifier
154 1 VPC_FP_Wrt (VPC3230D_A_ADDR, 0x006a,0x0aab);
*** ERROR C202 IN LINE 154 OF VPC3230.C: 'VPC3230D_A_ADDR': undefined identifier
155 1 VPC_FP_Wrt (VPC3230D_A_ADDR, 0x006d,0x0005);
*** ERROR C202 IN LINE 155 OF VPC3230.C: 'VPC3230D_A_ADDR': undefined identifier
156 1 }
157
158 /* ================================================================
159 Name : VPC_FP_Wrt
160 Purpose : VPC3230 Fast Processor Write Function
161 Passed : None
162 Notes : None
163 ================================================================ */
164
165 Bool VPC_FP_Wrt (Byte DevAdr, Word index, Word val)
166 {
167 1 Bool iAck;
168 1 Start();
169 1 iAck = Write(DevAdr);
170 1 if (iAck)
171 1 {
172 2 iAck = Write(0x37);
173 2 if (iAck)
174 2 {
175 3 iAck = Write((Byte)(index>>8));
176 3 if (iAck)
177 3 {
178 4 iAck = Write((Byte)(index));
179 4 if (iAck)
180 4 {
181 5 Stop();
182 5 Start();
183 5 iAck = Write(DevAdr);
184 5 if (iAck)
185 5 {
186 6 iAck = Write(0x38);
187 6 if (iAck)
188 6 {
189 7 iAck = Write((Byte)(val>>8));
190 7 if (iAck)
191 7 Write((Byte)(val));
192 7 }
193 6 }
194 5 }
195 4 }
196 3 }
197 2 }
198 1 Stop();
199 1 return iAck;
200 1 }
201
202 /* ================================================================
203 Name : VPC_Set_1Byte
204 Purpose : VPC3230 General Register Write Function One Byte
205 Passed : None
206 Notes : None
207 ================================================================ */
208
209 Bool VPC_Set_1Byte(Byte DevAdr, Byte index, Byte val)
210 {
211 1 Bool iAck;
C51 COMPILER V7.07 VPC3230 05/03/2006 14:00:56 PAGE 6
212 1 Start();
213 1 iAck = Write(DevAdr);
214 1 if (iAck)
215 1 {
216 2 iAck = Write(index);
217 2 if (iAck )
218 2 Write(val);
219 2 }
220 1 Stop();
221 1 return iAck;
222 1 }
223
224
225 /* ================================================================
226 Name : VPC_Set_2Byte
227 Purpose : VPC3230 General Register Write Function Two Byte
228 Passed : None
229 Notes : None
230 ================================================================ */
231
232 Bool VPC_Set_2Byte(Byte DevAdr, Byte index, Byte val, Byte val2)
233 {
234 1 Bool iAck;
235 1 Start();
236 1 iAck = Write(DevAdr);
237 1 if (iAck)
238 1 {
239 2 iAck = Write(index);
240 2 if (iAck)
241 2 {
242 3 iAck =Write(val);
243 3 if (iAck)
244 3 Write(val2);
245 3 }
246 2 }
247 1 Stop();
248 1 return iAck;
249 1 }
250
251 /* ================================================================
252 Name : SetVidSRC
253 Purpose : Set Vpc3230 Video Path
254 Passed : None
255 Notes : None
256 ================================================================ */
257
258 void SetVidSRC( Byte byMode, Byte bySystem )
259 {
260 1 switch (byMode)
261 1 {
262 2 case _AV:
263 2 VPC_FP_Wrt (VPC3230D_A_ADDR, 0x0020,Vid_Comb[bySystem][0]);
*** ERROR C202 IN LINE 263 OF VPC3230.C: 'VPC3230D_A_ADDR': undefined identifier
264 2 VPC_FP_Wrt (VPC3230D_A_ADDR, 0x0021,0x0865);
*** ERROR C202 IN LINE 264 OF VPC3230.C: 'VPC3230D_A_ADDR': undefined identifier
265 2 break;
266 2
267 2 case _YC:
268 2 VPC_FP_Wrt (VPC3230D_A_ADDR, 0x0020,Vid_Comb[bySystem][1]);
*** ERROR C202 IN LINE 268 OF VPC3230.C: 'VPC3230D_A_ADDR': undefined identifier
269 2 VPC_FP_Wrt (VPC3230D_A_ADDR, 0x0021,0x0866);
*** ERROR C202 IN LINE 269 OF VPC3230.C: 'VPC3230D_A_ADDR': undefined identifier
C51 COMPILER V7.07 VPC3230 05/03/2006 14:00:56 PAGE 7
270 2 break;
271 2
272 2 // G4 RealChip Board is not support
273 2 /*
274 2 case _Tuner:
275 2 VPC_FP_Wrt (VPC3230D_A_ADDR, 0x0020,Vid_Comb[bySystem][0]);
276 2 VPC_FP_Wrt (VPC3230D_A_ADDR, 0x0021,0x0864 );
277 2 break;
278 2
279 2 case _Component:
280 2 VPC_FP_Wrt (VPC3230D_A_ADDR, 0x0020,Vid_Comb[bySystem][0]);
281 2 VPC_FP_Wrt (VPC3230D_A_ADDR, 0x0021,0x08e3 );
282 2 break;
283 2 */
284 2 }
285 1 }
286
287 /* ================================================================
288 Name : Disable_VID_3230
289 Purpose : VPC3230 Disable Data Output
290 Passed : None
291 Notes : None
292 ================================================================ */
293
294 void Disable_VID_3230(void)
295 {
296 1 VPC_FP_Wrt (VPC3230D_A_ADDR, 0x0148,0x0000);
*** ERROR C202 IN LINE 296 OF VPC3230.C: 'VPC3230D_A_ADDR': undefined identifier
297 1 VPC_Set_2Byte(VPC3230D_A_ADDR, 0x1f, 0x03, 0xc8);
*** ERROR C202 IN LINE 297 OF VPC3230.C: 'VPC3230D_A_ADDR': undefined identifier
298 1 }
299
300 /* ================================================================
301 Name : Check_AV_SRC
302 Purpose : Toggle VPC3230D to Check if H-Sync is exist ?
303 Passed : None
304 Notes : None
305 ================================================================ */
306
307 Bool Check_AV_SRC ( void )
308 {
309 1 Word status=0;
310 1 Byte byCnt = 50;
311 1 Byte byLock = 0;
312 1
313 1 // Using VPC3230 check H-Sync 50 times
314 1 do
315 1 {
316 2 VPC_FP_Read(0x0013,&status);
317 2 TMR_wait_1ms(5);
318 2 if (( (status & 0x0007 )== 0x0003 ))
319 2 {
320 3 byLock++;
321 3 if (byLock >=3)
322 3 {
323 4 return TRUE;
324 4 }
325 3 }
326 2 }
327 1 while ((--byCnt) >0);
328 1 return FALSE;
329 1 }
C51 COMPILER V7.07 VPC3230 05/03/2006 14:00:56 PAGE 8
330
331 /* ================================================================
332 Name : VPC_FP_Read
333 Purpose : Read VPC3230 one Word
334 Passed : None
335 Notes : None
336 ================================================================ */
337
338 void VPC_FP_Read(Word index, Word *val)
339 {
340 1 Start();
341 1 Write(VPC3230D_A_ADDR);
342 1 Write(FPRead);
343 1 Write((Byte)(index>>8));
344 1 Write((Byte)(index));
345 1 Stop();
346 1 Start();
347 1 Write(VPC3230D_A_ADDR);
348 1 Write(FPDat);
349 1 Start();
350 1 Write(VPC3230D_A_ADDR+1);
351 1 *val = ReadWord();
352 1 Stop();
353 1 }
C51 COMPILATION COMPLETE. 0 WARNING(S), 98 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -