📄 periph.lst
字号:
251 2 EP6AUTOINLENH = 0x02; //ep6 auto commit length 512
252 2 SYNCDELAY;
253 2 EP6AUTOINLENL = 0x00;
254 2 SYNCDELAY;
255 2 }
256 1 else
257 1 {
258 2 SYNCDELAY; //
259 2 EP2AUTOINLENH = 0x00; //ep2 auto commit length 64
260 2 SYNCDELAY;
261 2 EP2AUTOINLENL = 0x40;
262 2 SYNCDELAY;
263 2 EP6AUTOINLENH = 0x00; //ep6 auto commit length 64
264 2 SYNCDELAY;
265 2 EP6AUTOINLENL = 0x40;
266 2 SYNCDELAY;
267 2 }
268 1 return(TRUE); // Handled by user code
269 1 }
270
271 BOOL DR_GetConfiguration(void) // Called when a Get Configuration command is received
272 {
273 1 EP0BUF[0] = Configuration;
274 1 EP0BCH = 0;
275 1 EP0BCL = 1;
276 1 return(TRUE); // Handled by user code
277 1 }
278
279 BOOL DR_SetInterface(void) // Called when a Set Interface command is received
280 {
281 1 AlternateSetting = SETUPDAT[2];
282 1 return(TRUE); // Handled by user code
283 1 }
284
285 BOOL DR_GetInterface(void) // Called when a Set Interface command is received
286 {
287 1 EP0BUF[0] = AlternateSetting;
288 1 EP0BCH = 0;
289 1 EP0BCL = 1;
290 1 return(TRUE); // Handled by user code
291 1 }
292
293 BOOL DR_GetStatus(void)
294 {
295 1 return(TRUE);
296 1 }
297
298 BOOL DR_ClearFeature(void)
299 {
300 1 return(TRUE);
301 1 }
C51 COMPILER V7.10 PERIPH 10/26/2005 09:28:03 PAGE 6
302
303 BOOL DR_SetFeature(void)
304 {
305 1 return(TRUE);
306 1 }
307
308 BOOL DR_VendorCmnd(void)
309 {
310 1 return(FALSE);
311 1 }
312
313 //-----------------------------------------------------------------------------
314 // USB Interrupt Handlers
315 // The following functions are called by the USB interrupt jump table.
316 //-----------------------------------------------------------------------------
317
318 // Setup Data Available Interrupt Handler
319 void ISR_Sudav(void) interrupt 0
320 {
321 1 GotSUD = TRUE; // Set flag
322 1 EZUSB_IRQ_CLEAR();
323 1 USBIRQ = bmSUDAV; // Clear SUDAV IRQ
324 1 }
325
326 // Setup Token Interrupt Handler
327 void ISR_Sutok(void) interrupt 0
328 {
329 1 EZUSB_IRQ_CLEAR();
330 1 USBIRQ = bmSUTOK; // Clear SUTOK IRQ
331 1 }
332
333 void ISR_Sof(void) interrupt 0
334 {
335 1 EZUSB_IRQ_CLEAR();
336 1 USBIRQ = bmSOF; // Clear SOF IRQ
337 1 }
338
339 void ISR_Ures(void) interrupt 0
340 {
341 1 // whenever we get a USB reset, we should revert to full speed mode
342 1 pConfigDscr = pFullSpeedConfigDscr;
343 1 ((CONFIGDSCR xdata *) pConfigDscr)->type = CONFIG_DSCR;
344 1 pOtherConfigDscr = pHighSpeedConfigDscr;
345 1 ((CONFIGDSCR xdata *) pOtherConfigDscr)->type = OTHERSPEED_DSCR;
346 1 High_Full_Flag = 0;
347 1
348 1 EZUSB_IRQ_CLEAR();
349 1 USBIRQ = bmURES; // Clear URES IRQ
350 1 }
351
352 void ISR_Susp(void) interrupt 0
353 {
354 1 Sleep = TRUE;
355 1 EZUSB_IRQ_CLEAR();
356 1 USBIRQ = bmSUSP;
357 1 }
358
359 void ISR_Highspeed(void) interrupt 0
360 {
361 1 if (EZUSB_HIGHSPEED())
362 1 {
363 2 pConfigDscr = pHighSpeedConfigDscr;
C51 COMPILER V7.10 PERIPH 10/26/2005 09:28:03 PAGE 7
364 2 ((CONFIGDSCR xdata *) pConfigDscr)->type = CONFIG_DSCR;
365 2 pOtherConfigDscr = pFullSpeedConfigDscr;
366 2 ((CONFIGDSCR xdata *) pOtherConfigDscr)->type = OTHERSPEED_DSCR;
367 2 High_Full_Flag = 1;
368 2 }
369 1
370 1 EZUSB_IRQ_CLEAR();
371 1 USBIRQ = bmHSGRANT;
372 1 }
373 void ISR_Ep0ack(void) interrupt 0
374 {
375 1 }
376 void ISR_Stub(void) interrupt 0
377 {
378 1 }
379 void ISR_Ep0in(void) interrupt 0
380 {
381 1 }
382 void ISR_Ep0out(void) interrupt 0
383 {
384 1 }
385 void ISR_Ep1in(void) interrupt 0
386 {
387 1 }
388 void ISR_Ep1out(void) interrupt 0
389 {
390 1 }
391 void ISR_Ep2inout(void) interrupt 0
392 {
393 1 }
394 void ISR_Ep4inout(void) interrupt 0
395 {
396 1 }
397 void ISR_Ep6inout(void) interrupt 0
398 {
399 1 }
400 void ISR_Ep8inout(void) interrupt 0
401 {
402 1 }
403 void ISR_Ibn(void) interrupt 0
404 {
405 1 }
406 void ISR_Ep0pingnak(void) interrupt 0
407 {
408 1 }
409 void ISR_Ep1pingnak(void) interrupt 0
410 {
411 1 }
412 void ISR_Ep2pingnak(void) interrupt 0
413 {
414 1 }
415 void ISR_Ep4pingnak(void) interrupt 0
416 {
417 1 }
418 void ISR_Ep6pingnak(void) interrupt 0
419 {
420 1 }
421 void ISR_Ep8pingnak(void) interrupt 0
422 {
423 1 }
424 void ISR_Errorlimit(void) interrupt 0
425 {
C51 COMPILER V7.10 PERIPH 10/26/2005 09:28:03 PAGE 8
426 1 }
427 void ISR_Ep2piderror(void) interrupt 0
428 {
429 1 }
430 void ISR_Ep4piderror(void) interrupt 0
431 {
432 1 }
433 void ISR_Ep6piderror(void) interrupt 0
434 {
435 1 }
436 void ISR_Ep8piderror(void) interrupt 0
437 {
438 1 }
439 void ISR_Ep2pflag(void) interrupt 0
440 {
441 1 }
442 void ISR_Ep4pflag(void) interrupt 0
443 {
444 1 }
445 void ISR_Ep6pflag(void) interrupt 0
446 {
447 1 }
448 void ISR_Ep8pflag(void) interrupt 0
449 {
450 1 }
451 void ISR_Ep2eflag(void) interrupt 0
452 {
453 1 }
454 void ISR_Ep4eflag(void) interrupt 0
455 {
456 1 }
457 void ISR_Ep6eflag(void) interrupt 0
458 {
459 1 }
460 void ISR_Ep8eflag(void) interrupt 0
461 {
462 1 }
463 void ISR_Ep2fflag(void) interrupt 0
464 {
465 1 }
466 void ISR_Ep4fflag(void) interrupt 0
467 {
468 1 }
469 void ISR_Ep6fflag(void) interrupt 0
470 {
471 1 }
472 void ISR_Ep8fflag(void) interrupt 0
473 {
474 1 }
475 void ISR_GpifComplete(void) interrupt 0
476 {
477 1 WORD xdata *pTemp_gpif;
478 1 GpifFinishFlag = 1;
479 1 if(PowerDown_Flag == 0)
480 1 {
481 2 if(GpifReadWriteFlag == 1)
482 2 {
483 3 Peripheral_SingleWordRead(pTemp_gpif);
484 3 // GpifReadWriteFlag = 0; //write
485 3 }
486 2 }
487 1 EXIF &= ~0x40;
C51 COMPILER V7.10 PERIPH 10/26/2005 09:28:03 PAGE 9
488 1 INT4CLR = 0xFF; // automatically enabled at POR
489 1 }
490 void ISR_GpifWaveform(void) interrupt 0
491 {
492 1 EXIF &= ~0x40;
493 1 INT4CLR = 0xFF; // automatically enabled at POR
494 1 }
495
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 841 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 7 14
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 2 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -