📄 mypcio.lst
字号:
478 4 REVCTL = 0x01; // ENH_PKT=1 (use enhanced packet handling)
479 4 SYNCDELAY; //
480 4 FIFORESET = 0x80; // nak all OUT pkts. from host
481 4 SYNCDELAY; //
482 4 FIFORESET = 0x02; // advance all EP2 buffers to cpu domain
483 4 SYNCDELAY; //
484 4 EP2FIFOBUF[0] = 0xAA; // create newly sourced pkt. data
485 4 SYNCDELAY; //
486 4 EP2BCH = 0x00;
487 4 SYNCDELAY; //
C51 COMPILER V7.50 MYPCIO 09/18/2006 19:53:27 PAGE 9
488 4 EP2BCL = 0x01; // commit newly sourced pkt. to interface fifo
489 4
490 4 // beware of "left over" uncommitted buffers
491 4
492 4 SYNCDELAY; //
493 4 OUTPKTEND = 0x82; // skip uncommitted pkt. (second pkt.)
494 4 SYNCDELAY; //
495 4 OUTPKTEND = 0x82; // skip uncommitted pkt. (third pkt.)
496 4 SYNCDELAY; //
497 4 OUTPKTEND = 0x82; // skip uncommitted pkt. (fourth pkt.)
498 4 // note: core will not allow pkts. to get out of sequence
499 4 SYNCDELAY; //
500 4 FIFORESET = 0x00; // release "nak all"
501 4 SYNCDELAY; //
502 4
503 4 *EP0BUF = VX_C2;
504 4 EP0BCH = 0;
505 4 EP0BCL = 1; // Arm endpoint with # bytes to transfer
506 4 EP0CS |= bmHSNAK; // Acknowledge handshake phase of device request
507 4
508 4
509 4 }
510 3 else
511 3 {
512 4 *EP0BUF = 0xFF;
513 4 EP0BCH = 0;
514 4 EP0BCL = 1; // Arm endpoint with # bytes to transfer
515 4 EP0CS |= bmHSNAK; // Acknowledge handshake phase of device request
516 4
517 4 }
518 3
519 3 break;
520 3 }
521 2 default:
522 2 {
523 3 ledX_rdvar = LED3_ON; // debug visual, stuck "ON" to warn developer...
524 3 return( FALSE ); // no error; command handled OK
525 3 }
526 2 }
527 1
528 1
529 1 return( FALSE ); // no error; command handled OK
530 1 }
531
532 //-----------------------------------------------------------------------------
533 // USB Interrupt Handlers
534 // The following functions are called by the USB interrupt jump table.
535 //-----------------------------------------------------------------------------
536
537 // Setup Data Available Interrupt Handler
538 void ISR_Sudav( void ) interrupt 0
539 {
540 1 GotSUD = TRUE; // Set flag
541 1 EZUSB_IRQ_CLEAR( );
542 1 USBIRQ = bmSUDAV; // Clear SUDAV IRQ
543 1 }
544
545 // Setup Token Interrupt Handler
546 void ISR_Sutok( void ) interrupt 0
547 {
548 1 EZUSB_IRQ_CLEAR( );
549 1 USBIRQ = bmSUTOK; // Clear SUTOK IRQ
C51 COMPILER V7.50 MYPCIO 09/18/2006 19:53:27 PAGE 10
550 1 }
551
552 void ISR_Sof( void ) interrupt 0
553 {
554 1 EZUSB_IRQ_CLEAR( );
555 1 USBIRQ = bmSOF; // Clear SOF IRQ
556 1 }
557
558 void ISR_Ures( void ) interrupt 0
559 {
560 1 if ( EZUSB_HIGHSPEED( ) )
561 1 {
562 2 pConfigDscr = pHighSpeedConfigDscr;
563 2 pOtherConfigDscr = pFullSpeedConfigDscr;
564 2 }
565 1 else
566 1 {
567 2 pConfigDscr = pFullSpeedConfigDscr;
568 2 pOtherConfigDscr = pHighSpeedConfigDscr;
569 2 }
570 1
571 1 EZUSB_IRQ_CLEAR( );
572 1 USBIRQ = bmURES; // Clear URES IRQ
573 1 }
574
575 void ISR_Susp( void ) interrupt 0
576 {
577 1 Sleep = TRUE;
578 1 EZUSB_IRQ_CLEAR( );
579 1 USBIRQ = bmSUSP;
580 1 }
581
582 void ISR_Highspeed( void ) interrupt 0
583 {
584 1 if ( EZUSB_HIGHSPEED( ) )
585 1 {
586 2 pConfigDscr = pHighSpeedConfigDscr;
587 2 pOtherConfigDscr = pFullSpeedConfigDscr;
588 2 }
589 1 else
590 1 {
591 2 pConfigDscr = pFullSpeedConfigDscr;
592 2 pOtherConfigDscr = pHighSpeedConfigDscr;
593 2 }
594 1
595 1 EZUSB_IRQ_CLEAR( );
596 1 USBIRQ = bmHSGRANT;
597 1 }
598 void ISR_Ep0ack( void ) interrupt 0
599 {
600 1 }
601 void ISR_Stub( void ) interrupt 0
602 {
603 1 }
604 void ISR_Ep0in( void ) interrupt 0
605 {
606 1 }
607 void ISR_Ep0out( void ) interrupt 0
608 {
609 1 }
610 void ISR_Ep1in( void ) interrupt 0
611 {
C51 COMPILER V7.50 MYPCIO 09/18/2006 19:53:27 PAGE 11
612 1 }
613 void ISR_Ep1out( void ) interrupt 0
614 {
615 1 }
616 void ISR_Ep2inout( void ) interrupt 0
617 {
618 1 }
619 void ISR_Ep4inout( void ) interrupt 0
620 {
621 1 }
622 void ISR_Ep6inout( void ) interrupt 0
623 {
624 1 }
625 void ISR_Ep8inout( void ) interrupt 0
626 {
627 1 }
628 void ISR_Ibn( void ) interrupt 0
629 {
630 1 }
631 void ISR_Ep0pingnak( void ) interrupt 0
632 {
633 1 }
634 void ISR_Ep1pingnak( void ) interrupt 0
635 {
636 1 }
637 void ISR_Ep2pingnak( void ) interrupt 0
638 {
639 1 }
640 void ISR_Ep4pingnak( void ) interrupt 0
641 {
642 1 }
643 void ISR_Ep6pingnak( void ) interrupt 0
644 {
645 1 }
646 void ISR_Ep8pingnak( void ) interrupt 0
647 {
648 1 }
649 void ISR_Errorlimit( void ) interrupt 0
650 {
651 1 }
652 void ISR_Ep2piderror( void ) interrupt 0
653 {
654 1 }
655 void ISR_Ep4piderror( void ) interrupt 0
656 {
657 1 }
658 void ISR_Ep6piderror( void ) interrupt 0
659 {
660 1 }
661 void ISR_Ep8piderror( void ) interrupt 0
662 {
663 1 }
664 void ISR_Ep2pflag( void ) interrupt 0
665 {
666 1 }
667 void ISR_Ep4pflag( void ) interrupt 0
668 {
669 1 }
670 void ISR_Ep6pflag( void ) interrupt 0
671 {
672 1 }
673 void ISR_Ep8pflag( void ) interrupt 0
C51 COMPILER V7.50 MYPCIO 09/18/2006 19:53:27 PAGE 12
674 {
675 1 }
676 void ISR_Ep2eflag( void ) interrupt 0
677 {
678 1 }
679 void ISR_Ep4eflag( void ) interrupt 0
680 {
681 1 }
682 void ISR_Ep6eflag( void ) interrupt 0
683 {
684 1 }
685 void ISR_Ep8eflag( void ) interrupt 0
686 {
687 1 }
688 void ISR_Ep2fflag( void ) interrupt 0
689 {
690 1 }
691 void ISR_Ep4fflag( void ) interrupt 0
692 {
693 1 }
694 void ISR_Ep6fflag( void ) interrupt 0
695 {
696 1 }
697 void ISR_Ep8fflag( void ) interrupt 0
698 {
699 1 }
700 void ISR_GpifComplete( void ) interrupt 0
701 {
702 1 }
703 void ISR_GpifWaveform( void ) interrupt 0
704 {
705 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 915 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = 16 ----
PDATA SIZE = ---- ----
DATA SIZE = 5 ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -