Isr.LST
上传用户:ids068
上传日期:2013-04-04
资源大小:639k
文件大小:11k
源码类别:

USB编程

开发平台:

C/C++

  1. C51 COMPILER V7.06   ISR                                                                   07/02/2003 09:29:10 PAGE 1   
  2. C51 COMPILER V7.06, COMPILATION OF MODULE ISR
  3. OBJECT MODULE PLACED IN Isr.OBJ
  4. COMPILER INVOKED BY: C:KEILC51BINC51.EXE Isr.c OPTIMIZE(2,SPEED) BROWSE DEBUG OBJECTEXTEND
  5. stmt level    source
  6.    1          //***********************************************************************
  7.    2          //                                                                                                                                                        *
  8.    3          //                P H I L I P S   P R O P R I E T A R Y                            *  
  9.    4          //                                                                      *
  10.    5          //          COPYRIGHT (c)   1999 BY PHILIPS SINGAPORE (APIC).                      *
  11.    6          //                    --  ALL RIGHTS RESERVED  --                               *       
  12.    7          //                                                                      *
  13.    8          //      File Name       :       Kernel.c                                      *
  14.    9          //      Author          :       Albert Goh                                                                                    *
  15.   10          //      Created         :       3 March 2000                                    *
  16.   11          //                                                                         *
  17.   12          //***********************************************************************
  18.   13          //***********************************************************************
  19.   14          //                                                                      *
  20.   15          // Kernel.c is the control centre for this evaluation firmware. It will *
  21.   16          // control where should the firmware branch through via the selection   *
  22.   17          // of the UART port of the 8051. if not via the UART, it will be from   *
  23.   18          // the selection of the code defintion                                  *
  24.   19          //                                                                      *
  25.   20          //***********************************************************************
  26.   21          //***********************************************************************
  27.   22          //                                                                      *
  28.   23          //  Module History                                                                                                                          *
  29.   24          //  **************                                                                                                                          *
  30.   25          //                                                                                                                                                                *
  31.   26          //  Date        Version                 Author                          Changes                                       *  
  32.   27          //  ====        =======                 ======                          =======                                          *
  33.   28          //  030300        0.1                   Albert                          Created                                       *  
  34.   29          //                                                                      *
  35.   30          //                                                                      *
  36.   31          //***********************************************************************
  37.   32          //***********************************************************************
  38.   33          //*                                                                                                                                                            *
  39.   34          //*                          Include Files Definition                                              *
  40.   35          //*                                                                                                                                                            *
  41.   36          //***********************************************************************
  42.   37          
  43.   38          #include "standard.h"
  44.   39          #include "Kernel.h"
  45.   40          #include "D14.h"
  46.   41          
  47.   42          extern KERNEL Kernel_Flag;
  48.   43          extern D14_CNTRL_REG xdata *D14_Cntrl_Ptr;
  49.   44          extern volatile D14_CNTRL_REG   xdata   D14_Cntrl_Reg;
  50.   45          
  51.   46          extern DMA_INT_FLAG DMA_Int_Flag;
  52.   47          extern USB_INT_FLAG USB_Int_Flag;
  53.   48          extern void Init_D14(void);
  54.   49          extern UC ATAPI_State;
  55.   50          extern DRIVE_CONFIG     Drive_Setup;
  56.   51          extern void Set_USB(void);
  57.   52          extern ULI bytecount;
  58.   53          extern UI PIO_Count;
  59.   54          
  60.   55          //***********************************************************************
  61. C51 COMPILER V7.06   ISR                                                                   07/02/2003 09:29:10 PAGE 2   
  62.   56          //*                                                                                                                                                            *
  63.   57          //*                          Variable Definition                                                              *
  64.   58          //*                                                                                                                                                            *
  65.   59          //***********************************************************************
  66.   60          
  67.   61          
  68.   62          UI      idata   Data;
  69.   63          ULI USB_Interrupt;
  70.   64          UI      DMA_Interrupt;
  71.   65          UC      timecouter=0;
  72.   66          
  73.   67          //***********************************************************************
  74.   68          //*                                                                                                                                                            *
  75.   69          //*                          Routine Definition                                                            *
  76.   70          //*                                                                                                                                                            *
  77.   71          //***********************************************************************
  78.   72          
  79.   73          void Int_2(void) interrupt 2 using 0
  80.   74          {
  81.   75   1      }
  82.   76          
  83.   77          void Int_3(void) interrupt 3 using 0
  84.   78          {
  85.   79   1      
  86.   80   1              TH1=60;
  87.   81   1              TL1=80;
  88.   82   1              timecouter++;
  89.   83   1      }
  90.   84          
  91.   85          void Int_4(void) interrupt 4 using 0
  92.   86          {
  93.   87   1      }
  94.   88          
  95.   89          void Int_5(void) interrupt 5 using 0
  96.   90          {
  97.   91   1      }
  98.   92          
  99.   93          //***********************************************************************
  100.   94          //*                                                                                                                                                    *
  101.   95          //*     Routine         : Int_Timer0                                                       *
  102.   96          //*     Input           : Timer 0 overflow                                                                                  *
  103.   97          //*     Output          : Set time up flag                                                         *
  104.   98          //*     Function        : To set the time up flag                                             *
  105.   99          //*                                                                                                                                                            *
  106.  100          //***********************************************************************
  107.  101          
  108.  102          void Int_Timer0(void) interrupt 1 using 0
  109.  103          {
  110.  104   1              
  111.  105   1              Kernel_Flag.BITS.Timer_Expired = 1;
  112.  106   1      }
  113.  107          
  114.  108          //***********************************************************************
  115.  109          //*                                                                                                                                                    *
  116.  110          //*     Routine         :  Int Ext 0                                                    *
  117.  111          //*     Input           :  External Interrupt from ISP1581                       *
  118.  112          //*     Output  :  None                                                                            *
  119.  113          //*     Function        :  To read and keep a copy of the interrupt source of    *
  120.  114          //*                                ISP1581                                                                                                                    *
  121.  115          //***********************************************************************
  122.  116          
  123.  117          void Int_Ext_0(void) interrupt 0 using 1
  124. C51 COMPILER V7.06   ISR                                                                   07/02/2003 09:29:10 PAGE 3   
  125.  118          {
  126.  119   1              
  127.  120   1              //read in USB interrupt register and keep a copy
  128.  121   1              //         USB_Interrupt = D14_Cntrl_Reg.D14_INT.VALUE;
  129.  122   1              //         USB_Int_Flag.VALUE |= USB_Interrupt;
  130.  123   1              
  131.  124   1              //读取ISP1581中断寄存器
  132.  125   1              USB_Int_Flag.VALUE |= D14_Cntrl_Reg.D14_INT.VALUE;
  133.  126   1              //回写ISP1581中断寄存器
  134.  127   1              D14_Cntrl_Reg.D14_INT.VALUE = USB_Int_Flag.VALUE;
  135.  128   1      
  136.  129   1      //      if (USB_Int_Flag.BITS.EP1RX)
  137.  130   1      //              USB_Int_Flag.BITS.EP1RX = 0;
  138.  131   1      
  139.  132   1              //总线复位处理  
  140.  133   1              if(USB_Int_Flag.BITS.RESET)
  141.  134   1              {
  142.  135   2                      //清除总线复位中断位            
  143.  136   2                      USB_Int_Flag.BITS.RESET = 0;
  144.  137   2                      //设置总线复位标志
  145.  138   2                      Kernel_Flag.BITS.Bus_Reset = 1;
  146.  139   2      
  147.  140   2                      PIO_Count = 64;
  148.  141   2                      
  149.  142   2                      //切换到全速模式
  150.  143   2              HS_FS_LED = FULL_SPEED_LED;
  151.  144   2                      Kernel_Flag.BITS.HS_FS_State = FULL_SPEED;
  152.  145   2                      //初始化ISP1581
  153.  146   2                      Init_D14();
  154.  147   2                      //设置softconnect
  155.  148   2                      D14_Cntrl_Reg.D14_MODE.BITS.SOFTCT = 1;         
  156.  149   2              }
  157.  150   1              
  158.  151   1      }
  159. MODULE INFORMATION:   STATIC OVERLAYABLE
  160.    CODE SIZE        =    155    ----
  161.    CONSTANT SIZE    =   ----    ----
  162.    XDATA SIZE       =   ----    ----
  163.    PDATA SIZE       =   ----    ----
  164.    DATA SIZE        =      7    ----
  165.    IDATA SIZE       =      2    ----
  166.    BIT SIZE         =   ----    ----
  167. END OF MODULE INFORMATION.
  168. C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)