⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kernel.lst

📁 USB 源码 ISP1581 Device controller
💻 LST
字号:
C51 COMPILER V7.01  KERNEL                                                                 03/28/2003 14:38:29 PAGE 1   


C51 COMPILER V7.01, COMPILATION OF MODULE KERNEL
OBJECT MODULE PLACED IN kernel.OBJ
COMPILER INVOKED BY: d:\Keil\C51\BIN\C51.EXE kernel.c OPTIMIZE(2,SPEED) BROWSE DEBUG OBJECTEXTEND

stmt level    source

   1          //***********************************************************************
   2          //                                                                                                                                                        *
   3          //                P H I L I P S   P R O P R I E T A R Y                            *
   4          //                                                                      *
   5          //          COPYRIGHT (c)   1999 BY PHILIPS SINGAPORE (APIC).                      *
   6          //                    --  ALL RIGHTS RESERVED  --                               *       
   7          //                                                                      *
   8          //      File Name       :       Kernel.c                                      *
   9          //      Author          :       Albert Goh                                                                                    *
  10          //      Created         :       3 March 2000                                    *
  11          //                                                                         *
  12          //***********************************************************************
  13          //***********************************************************************
  14          //                                                                      *
  15          // Kernel.c is the control centre for this evaluation firmware. It will *
  16          // control where should the firmware branch through via the selection   *
  17          // of the UART port of the 8051. if not via the UART, it will be from   *
  18          // the selection of the code defintion                                  *
  19          //                                                                      *
  20          //***********************************************************************
  21          //***********************************************************************
  22          //                                                                      *
  23          //  Module History                                                                                                                          *  
  24          //  **************                                                                                                                          *
  25          //                                                                                                                                                                *
  26          //  Date        Version                 Author                          Changes                                       *
  27          //  ====        =======                 ======                          =======                                          *
  28          //  030300        0.1                   Albert                          Created                                       *
  29          //                                                                      *
  30          //                                                                      *
  31          //***********************************************************************
  32          //***********************************************************************
  33          //*                                                                                                                                                            *
  34          //*                          Include Files Definition                                              *
  35          //*                                                                                                                                                            *
  36          //***********************************************************************
  37          
  38          #include "standard.h"
  39          #include "Kernel.h"
  40          #include "D14.h"
  41          #include "zlg7289.h"
  42          #include "VIIC_C51.h"
  43          
  44          //***********************************************************************
  45          //*                                                                                                                                                            *
  46          //*                      External routine Definition                                                  *
  47          //*                                                                                                                                                            *
  48          //***********************************************************************
  49          
  50          extern Init_Main();
  51          extern USB_Debug_Mode();
  52          extern DMA_Debug_Mode();
  53          extern USB_INT_FLAG USB_Int_Flag;
  54          extern DMA_INT_FLAG DMA_Int_Flag;
  55          extern USB_DEVICE USB_Device;
C51 COMPILER V7.01  KERNEL                                                                 03/28/2003 14:38:29 PAGE 2   

  56          extern volatile D14_CNTRL_REG   xdata   D14_Cntrl_Reg;
  57          extern void Check_Busy(void);
  58          extern void Init_D14(void);
  59          extern void Init_Endpoint(void);
  60          extern void Init_Device(void);
  61          extern void Get_PIDVID(void);
  62          extern unsigned int read_endpoint(unsigned char endp,unsigned int len,unsigned char *buf);
  63          extern unsigned int write_endpoint(unsigned char endp,unsigned int len,unsigned char *buf);
  64          extern UC VID[2],PID[2];
  65          extern UC       idata Endpt_FIFO[MAX_BUF];
  66          extern Set_USB(void);
  67          extern TIMER    Timer;
  68          extern UC       timecouter;
  69          extern UC Device_Config_Value;
  70          //***********************************************************************
  71          //*                                                                                                                                                            *
  72          //*                      Prototype routine Definition                                              *
  73          //*                                                                                                                                                            *
  74          //***********************************************************************
  75          
  76          void Start_mSEC_Timer(Data);
  77          void Start_SEC_Timer(Data);
  78          uchar DelayNS(uchar no);
  79          
  80          //***********************************************************************
  81          //*                                                                                                                                                            *
  82          //*                          Variable Definition                                                              *
  83          //*                                                                                                                                                            *
  84          //***********************************************************************
  85          
  86          UI      Temp;
  87          KERNEL Kernel_Flag;
  88          uchar code td[5]={0x00,0x12,0x48,0x30,0x12};   //8563初始化值
  89          uchar code disp_buf[8]={0,0,0,0,0,0,0,0};               //LED初始化值
  90          //UC key=0xff;
  91          //***********************************************************************
  92          //*                                                                                                                                                            *
  93          //*                          Routine Definition                                                            *
  94          //*                                                                                                                                                            *
  95          //***********************************************************************
  96          
  97          //***********************************************************************
  98          //*                                                                                                                                                    *
  99          //*     Routine         :  Main                                                            *
 100          //*     Input           :  None                                                                                             *
 101          //*     Output   :      None                                                                       *
 102          //*     Function        :       main loop                                                             *
 103          //*                                                                                                                                                            *
 104          //***********************************************************************
 105          
 106          void Main(void)
 107          {
 108   1              unsigned char time_send;
 109   1      
 110   1              DelayNS(5);
 111   1              ISendStr(0xa2,0,td,0x5);
 112   1              ZLG7289_Rest();         // 复位ZLG7289
 113   1          DelayNS(5);
 114   1              //Initialization routine
 115   1              //初始化子程序
 116   1              ZLG7289_SendBuf(disp_buf);
 117   1              Init_Main();                    
C51 COMPILER V7.01  KERNEL                                                                 03/28/2003 14:38:29 PAGE 3   

 118   1      
 119   1              time_send = 0;
 120   1              
 121   1              //enable device and reset the device address
 122   1              D14_Cntrl_Reg.D14_MODE.BITS.SOFTCT = 1; 
 123   1              
 124   1              do
 125   1              {               
 126   2                      //USB routine
 127   2                      USB_Debug_Mode();
 128   2                      
 129   2                      //Generic DMA routine
 130   2                      DMA_Debug_Mode();       
 131   2                      if(     USB_Int_Flag.BITS.EP1RX==1)    //接受数据并显示
 132   2                      {
 133   3                              read_endpoint(2,8,Endpt_FIFO);
 134   3                              ZLG7289_SendBuf(Endpt_FIFO);
 135   3                              USB_Int_Flag.BITS.EP1RX=0;
 136   3                      }
 137   2                      if(timecouter > 30  && Device_Config_Value > 0 )                //定时读取键值,并发送时间(82ms,12MHz

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -