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

USB编程

开发平台:

C/C++

  1. C51 COMPILER V7.06   ISR                                                                   07/02/2003 10:27:49 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          /****************************************Copyright (c)**************************************************
  7.    2          **                               广州周立功单片机发展有限公司
  8.    3          **                                     研    究    所
  9.    4          **                                 http://www.zlgmcu.com
  10.    5          **--------------当前版本修订------------------------------------------------------------------------------
  11.    6          ** 修改人: 刘英斌
  12.    7          ** 日 期:2003-03-13
  13.    8          ** 描 述:ISP1581 V1.0
  14.    9          **------------------------------------------------------------------------------------------------------
  15.   10          ********************************************************************************************************/
  16.   11          
  17.   12          #include "standard.h"
  18.   13          #include "Kernel.h"
  19.   14          #include "D14.h"
  20.   15          
  21.   16          extern KERNEL Kernel_Flag;
  22.   17          extern D14_CNTRL_REG xdata *D14_Cntrl_Ptr;
  23.   18          extern volatile D14_CNTRL_REG   xdata   D14_Cntrl_Reg;
  24.   19          
  25.   20          extern DMA_INT_FLAG DMA_Int_Flag;
  26.   21          extern USB_INT_FLAG USB_Int_Flag;
  27.   22          extern void Init_D14(void);
  28.   23          extern UC ATAPI_State;
  29.   24          extern DRIVE_CONFIG     Drive_Setup;
  30.   25          extern void Set_USB(void);
  31.   26          extern ULI bytecount;
  32.   27          extern UI PIO_Count;
  33.   28          
  34.   29          //***********************************************************************
  35.   30          //*                                                                                                                                                            *
  36.   31          //*                          Variable Definition                                                              *
  37.   32          //*                                                                                                                                                            *
  38.   33          //***********************************************************************
  39.   34          
  40.   35          
  41.   36          UI      idata   Data;
  42.   37          ULI USB_Interrupt;
  43.   38          UI DMA_Interrupt;
  44.   39          
  45.   40          
  46.   41          //***********************************************************************
  47.   42          //*                                                                                                                                                            *
  48.   43          //*                          Routine Definition                                                            *
  49.   44          //*                                                                                                                                                            *
  50.   45          //***********************************************************************
  51.   46          
  52.   47          void Int_2(void) interrupt 2 using 0
  53.   48          {
  54.   49   1      }
  55.   50          
  56.   51          void Int_3(void) interrupt 3 using 0
  57.   52          {
  58.   53   1      }
  59.   54          
  60.   55          void Int_4(void) interrupt 4 using 0
  61. C51 COMPILER V7.06   ISR                                                                   07/02/2003 10:27:49 PAGE 2   
  62.   56          {
  63.   57   1      }
  64.   58          
  65.   59          void Int_5(void) interrupt 5 using 0
  66.   60          {
  67.   61   1      }
  68.   62          
  69.   63          //***********************************************************************
  70.   64          //*                                                                                                                                                    *
  71.   65          //*     Routine         : Int_Timer0                                                       *
  72.   66          //*     Input           : Timer 0 overflow                                                                                  *
  73.   67          //*     Output          : Set time up flag                                                         *
  74.   68          //*     Function        : To set the time up flag                                             *
  75.   69          //*                                                                                                                                                            *
  76.   70          //***********************************************************************
  77.   71          
  78.   72          void Int_Timer0(void) interrupt 1 using 0
  79.   73          {
  80.   74   1              
  81.   75   1              Kernel_Flag.BITS.Timer_Expired = 1;
  82.   76   1      }
  83.   77          
  84.   78          //***********************************************************************
  85.   79          //*                                                                                                                                                    *
  86.   80          //*     Routine         :  Int Ext 0                                                    *
  87.   81          //*     Input           :  External Interrupt from ISP1581                       *
  88.   82          //*     Output  :  None                                                                            *
  89.   83          //*     Function        :  To read and keep a copy of the interrupt source of    *
  90.   84          //*                                ISP1581                                                                                                                    *
  91.   85          //***********************************************************************
  92.   86          void Int_Ext_0(void) interrupt 0 using 1
  93.   87          {
  94.   88   1              
  95.   89   1              //read in USB interrupt register and keep a copy
  96.   90   1              //         USB_Interrupt = D14_Cntrl_Reg.D14_INT.VALUE;
  97.   91   1              //         USB_Int_Flag.VALUE |= USB_Interrupt;
  98.   92   1              
  99.   93   1              //读取ISP1581中断寄存器
  100.   94   1              USB_Int_Flag.VALUE |= D14_Cntrl_Reg.D14_INT.VALUE;
  101.   95   1              //回写ISP1581中断寄存器
  102.   96   1              D14_Cntrl_Reg.D14_INT.VALUE = USB_Int_Flag.VALUE;
  103.   97   1      
  104.   98   1              //总线复位处理  
  105.   99   1              if(USB_Int_Flag.BITS.RESET)
  106.  100   1              {
  107.  101   2                      //清除总线复位中断位            
  108.  102   2                      USB_Int_Flag.BITS.RESET = 0;
  109.  103   2                      //设置总线复位标志
  110.  104   2                      Kernel_Flag.BITS.Bus_Reset = 1;
  111.  105   2      
  112.  106   2                      PIO_Count = 64;
  113.  107   2                      
  114.  108   2                      //切换到全速模式
  115.  109   2              HS_FS_LED = FULL_SPEED_LED;
  116.  110   2                      Kernel_Flag.BITS.HS_FS_State = FULL_SPEED;
  117.  111   2                      //初始化ISP1581
  118.  112   2                      Init_D14();
  119.  113   2                      //设置softconnect
  120.  114   2                      D14_Cntrl_Reg.D14_MODE.BITS.SOFTCT = 1;         
  121.  115   2              }
  122.  116   1              
  123.  117   1      }
  124. C51 COMPILER V7.06   ISR                                                                   07/02/2003 10:27:49 PAGE 3   
  125. MODULE INFORMATION:   STATIC OVERLAYABLE
  126.    CODE SIZE        =    147    ----
  127.    CONSTANT SIZE    =   ----    ----
  128.    XDATA SIZE       =   ----    ----
  129.    PDATA SIZE       =   ----    ----
  130.    DATA SIZE        =      6    ----
  131.    IDATA SIZE       =      2    ----
  132.    BIT SIZE         =   ----    ----
  133. END OF MODULE INFORMATION.
  134. C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)