main.lst

来自「51单片机与SL811HST做从机的鼠标程序」· LST 代码 · 共 93 行

LST
93
字号
C51 COMPILER V7.20   MAIN                                                                  05/16/2004 23:08:34 PAGE 1   


C51 COMPILER V7.20, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN main.OBJ
COMPILER INVOKED BY: F:\keil\C51\BIN\C51.EXE main.c BROWSE DEBUG OBJECTEXTEND

line level    source

   1          #include <reg51.h>
   2          #include <sl811.h>
   3          //#include <des.h>
   4          //#include <varial.h>
   5          extern  bit timeout;
   6          extern  bit enum_done;
   7          extern  unsigned char sof_cnt;
   8          extern  unsigned char key_current;
   9          /*******************************************************/
  10          void  main(void)
  11          {
  12   1      unsigned char int_status;
  13   1        C51_init();
  14   1      
  15   1       while(TRUE)
  16   1        {
  17   2         int_status=SL811Read(IntStatus);//0DH REGISTER
  18   2         if(int_status & USB_RESET_DONE)
  19   2           SL811s_init(); 
  20   2          else  if(int_status & EP0_DONE)
  21   2               ep0_isr();
  22   2      
  23   2              else if(int_status & EP1_DONE)
  24   2           ep1_isr();
  25   2              else if(int_status & SOF_DONE)
  26   2              sof_isr();
  27   2      
  28   2               if(enum_done)
  29   2               {
  30   3                audio_key_scan();
  31   3                 //timeout=0;
  32   3                sof_cnt++;
  33   3      
  34   3                if(sof_cnt>=4)
  35   3                 {
  36   4                  //SL811Write(CtrlReg,0x40);
  37   4            /* do
  38   4              {
  39   4                       key_current=P1;
  40   4                   if((key_current&0xff)!=0xff)
  41   4                          {  Delay();
  42   4                                 
  43   4                                key_current=P1;
  44   4                    if((key_current&0xff)!=0xff)
  45   4                                  { 
  46   4                                   
  47   4                                        if((~key_current)!=0)
  48   4                                            {
  49   4                                                SL811Write(CtrlReg,0x10);
  50   4                                                Delay();
  51   4                                                Delay();
  52   4                                                Delay();
  53   4                                               SL811Write(IntEna,0x63);                               //06h enable SOF, EP0, EP1, USB Reset interrupts 
  54   4                           SL811Write(IntStatus,0xff);                                //0dh clear all interrupts
  55   4                           SL811Write(CtrlReg,0x21);
C51 COMPILER V7.20   MAIN                                                                  05/16/2004 23:08:34 PAGE 2   

  56   4                           EP0A_OUT_Arm(EP0_LEN);
  57   4                                                }
  58   4                                       }
  59   4                                 }
  60   4                               } while(sof_cnt!=0);*/
  61   4                       }
  62   3      
  63   3               
  64   3                }
  65   2               
  66   2         }
  67   1        }


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =     63    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----       1
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

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