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

📄 display_led.lst

📁 Small RTOS 下SJA1000驱动程序的编写。主要介绍了在实时操作系统Small RTOS下
💻 LST
字号:
C51 COMPILER V7.01  DISPLAY_LED                                                            03/06/2003 10:20:06 PAGE 1   


C51 COMPILER V7.01, COMPILATION OF MODULE DISPLAY_LED
OBJECT MODULE PLACED IN .\DISPLAY_LED.obj
COMPILER INVOKED BY: C:\KEIL\C51\BIN\C51.EXE ..\dp51_led\DISPLAY_LED.C BROWSE NOINTPROMOTE INCDIR(G:\S_RTOS_TEST\INC\) D
                    -EBUG OBJECTEXTEND PRINT(.\DISPLAY_LED.lst) OBJECT(.\DISPLAY_LED.obj)

stmt level    source

   1          /*
   2           *********************************************************************************************************
             -***********
   3           *描述:    DP-51中LED显示程序文件
   4           *文件名:   DISPLAY_LED.C
   5           *应用语言: KEIL C51
   6           *版本 :    V1.0
   7           *作者:    刘养海
   8           *广州周立功单片机发展有限公司 保留所有的版权
   9           *********************************************************************************************************
             -***********
  10           */
  11           /*
  12           *********************************************************************************************************
             -***********
  13           *应用定义
  14           *********************************************************************************************************
             -***********
  15           */
  16           #define        _GLOBAL_DISPLAY_LED_
  17          /*
  18           *********************************************************************************************************
             -***********
  19           *引用头文件
  20           *********************************************************************************************************
             -***********
  21           */
  22          //#include <w77E58.H>
  23           #include       <P8XC5X2.H>
*** ERROR C318 IN LINE 23 OF ..\dp51_led\DISPLAY_LED.C: can't open file 'P8XC5X2.H'
  24           #include   <string.h>
  25           #include   <intrins.h>
  26          
  27           #include       "DISPLAY_LED.H"
  28          
  29          /*
  30           *********************************************************************************************************
             -***********
  31           *本文件中使用常量定义
  32           *********************************************************************************************************
             -***********
  33           */
  34           #define        DispLightFre            200
  35           #define        LEDBITCTRL                      P1
  36           
  37           sbit           EBIT0           = P1^7;                                 /* LED显示位选:LED0                */
*** ERROR C202 IN LINE 37 OF ..\DP51_LED\DISPLAY_LED.C: 'P1': undefined identifier
  38           sbit           EBIT1           = P1^6;                                 /* LED显示位选:LED1                */
*** ERROR C202 IN LINE 38 OF ..\DP51_LED\DISPLAY_LED.C: 'P1': undefined identifier
  39           sbit           EBIT2           = P1^5;                                 /* LED显示位选:LED2                */
*** ERROR C202 IN LINE 39 OF ..\DP51_LED\DISPLAY_LED.C: 'P1': undefined identifier
  40           sbit           EBIT3           = P1^4;                                 /* LED显示位选:LED3                */
*** ERROR C202 IN LINE 40 OF ..\DP51_LED\DISPLAY_LED.C: 'P1': undefined identifier
  41           sbit           EBIT4           = P1^3;                                 /* LED显示位选:LED4                */
C51 COMPILER V7.01  DISPLAY_LED                                                            03/06/2003 10:20:06 PAGE 2   

*** ERROR C202 IN LINE 41 OF ..\DP51_LED\DISPLAY_LED.C: 'P1': undefined identifier
  42          
  43           sbit           LEDSDA          = P1^0;                                                 //串行显示数据线
*** ERROR C202 IN LINE 43 OF ..\DP51_LED\DISPLAY_LED.C: 'P1': undefined identifier
  44           sbit           LEDSCL          = P1^1;                                                 //串行显示时钟线
*** ERROR C202 IN LINE 44 OF ..\DP51_LED\DISPLAY_LED.C: 'P1': undefined identifier
  45          
  46           bit            SyncFlight;                                                             //同步闪烁控制
  47          
  48           unsigned char  GlintCounter;                                           //闪烁计数器
  49          
  50          /*
  51           *********************************************************************************************************
             -***********
  52           *本文件中子函数定义
  53           *********************************************************************************************************
             -***********
  54           */
  55          void    SendDataToShow(unsigned char value)
  56          {
  57   1              unsigned char i=8;
  58   1              LEDBITCTRL |= 0x03;                     //使能显示控制时钟、数据线
*** ERROR C202 IN LINE 58 OF ..\DP51_LED\DISPLAY_LED.C: 'P1': undefined identifier
  59   1              while(i--){
  60   2                      value <<=1;
  61   2                      LEDSDA = CY;
*** ERROR C202 IN LINE 61 OF ..\DP51_LED\DISPLAY_LED.C: 'LEDSDA': undefined identifier
  62   2                      LEDSCL =0;
*** ERROR C202 IN LINE 62 OF ..\DP51_LED\DISPLAY_LED.C: 'LEDSCL': undefined identifier
  63   2                      LEDSCL =1;
*** ERROR C202 IN LINE 63 OF ..\DP51_LED\DISPLAY_LED.C: 'LEDSCL': undefined identifier
  64   2              }
  65   1      
  66   1      }
  67          
  68          /*
  69           *********************************************************************************************************
             -***********
  70           函数原型:  void      Show_LED(void)                                        
  71           参数说明:  无                                                         
  72           返回值:    无
  73           说明:          该函数用于LED显示处理                        
  74           *********************************************************************************************************
             -***********
  75           */
  76           void      Show_LED(void){
  77   1              if((structDisplayLedApp.DisplayPoint++)>4)
  78   1                      structDisplayLedApp.DisplayPoint=0;                                     //位选
  79   1              GlintCounter++;                                                                                 //闪烁计数
  80   1              if(GlintCounter>DispLightFre ){
  81   2                      GlintCounter = 0;
  82   2                      SyncFlight       = ~SyncFlight;
  83   2              }
  84   1      
  85   1              if(structDisplayLedApp.LedGlintAtbBit0){
  86   2                      structDisplayLedApp.LedImmergeAtbBit0 = SyncFlight;
  87   2              }
  88   1              
  89   1              if(structDisplayLedApp.LedGlintAtbBit1){
  90   2                      structDisplayLedApp.LedImmergeAtbBit1 = SyncFlight;
  91   2              }
  92   1              if(structDisplayLedApp.LedGlintAtbBit2){
C51 COMPILER V7.01  DISPLAY_LED                                                            03/06/2003 10:20:06 PAGE 3   

  93   2                      structDisplayLedApp.LedImmergeAtbBit2 = SyncFlight;
  94   2              }
  95   1              if(structDisplayLedApp.LedGlintAtbBit3){
  96   2                      structDisplayLedApp.LedImmergeAtbBit3 = SyncFlight;
  97   2              }
  98   1              if(structDisplayLedApp.LedGlintAtbBit4){
  99   2                      structDisplayLedApp.LedImmergeAtbBit4 = SyncFlight;
 100   2              }
 101   1              
 102   1              SendDataToShow(0xff);                                                                                   //送0xff以消除电影效果
 103   1              LEDBITCTRL |= 0xF8;                                                                             //关显示
*** ERROR C202 IN LINE 103 OF ..\DP51_LED\DISPLAY_LED.C: 'P1': undefined identifier
 104   1          SendDataToShow(LedSegCode[structDisplayLedApp.DisplayBuf[structDisplayLedApp.DisplayPoint]]);       
 105   1          switch(structDisplayLedApp.DisplayPoint){
 106   2              case 0:if(!structDisplayLedApp.LedImmergeAtbBit0)
 107   2                                      EBIT0=0;                                                //位选0
*** ERROR C202 IN LINE 107 OF ..\DP51_LED\DISPLAY_LED.C: 'EBIT0': undefined identifier
 108   2                       break;
 109   2              case 1:                                                         //位选1
 110   2                       if(!structDisplayLedApp.LedImmergeAtbBit1)EBIT1=0;                             
*** ERROR C202 IN LINE 110 OF ..\DP51_LED\DISPLAY_LED.C: 'EBIT1': undefined identifier
 111   2                       break;
 112   2                      case 2:
 113   2                       if(!structDisplayLedApp.LedImmergeAtbBit2)EBIT2=0;                             //位选2
*** ERROR C202 IN LINE 113 OF ..\DP51_LED\DISPLAY_LED.C: 'EBIT2': undefined identifier
 114   2                       break;
 115   2                      case 3:
 116   2                       if(!structDisplayLedApp.LedImmergeAtbBit3)EBIT3=0;                             //位选3
*** ERROR C202 IN LINE 116 OF ..\DP51_LED\DISPLAY_LED.C: 'EBIT3': undefined identifier
 117   2                       break;
 118   2              case 4:
 119   2                       if(!structDisplayLedApp.LedImmergeAtbBit4)EBIT4=0;                             //位选4
*** ERROR C202 IN LINE 119 OF ..\DP51_LED\DISPLAY_LED.C: 'EBIT4': undefined identifier
 120   2                       break;
 121   2                      default:structDisplayLedApp.DisplayPoint=0;
 122   2                               structDisplayLedApp.LedImmergeAtbBit0 =0;
 123   2                               structDisplayLedApp.LedImmergeAtbBit1 =0;
 124   2                               structDisplayLedApp.LedImmergeAtbBit2 =0;
 125   2                               structDisplayLedApp.LedImmergeAtbBit3 =0;
 126   2                               structDisplayLedApp.LedImmergeAtbBit4 =0;
 127   2                       break;
 128   2              }       
 129   1      
 130   1      
 131   1      }
 132          
 133          
 134          
 135          
 136          
 137          
 138          
 139          
 140          
 141          
 142          
 143          
 144          
 145          
 146          
 147          
 148          
C51 COMPILER V7.01  DISPLAY_LED                                                            03/06/2003 10:20:06 PAGE 4   

 149           

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

⌨️ 快捷键说明

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