亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sch51.lst

?? 51系列具有PWM斷口的單片機PWM調制程序.
?? LST
字號:
C51 COMPILER V6.10  SCH51                                                                  03/16/2001 06:57:40 PAGE 1   


C51 COMPILER V6.10, COMPILATION OF MODULE SCH51
OBJECT MODULE PLACED IN .\SCH51.OBJ
COMPILER INVOKED BY: C:\KEIL\C51\BIN\C51.EXE .\SCH51.C OPTIMIZE(6,SPEED) BROWSE DEBUG OBJECTEXTEND

stmt level    source

   1          /*------------------------------------------------------------------*-
   2          
   3             SCH51.C (v1.00) 
   4          
   5            ------------------------------------------------------------------
   6          
   7             *** THESE ARE THE CORE SCHEDULER FUNCTIONS ***
   8             --- These functions may be used with all 8051 devices ---
   9          
  10             *** SCH_MAX_TASKS *must* be set by the user ***
  11             --- see "Sch51.H" ---
  12          
  13             *** Includes (optional) power-saving mode ***
  14             --- You must ensure that the power-down mode is adapted ---
  15             --- to match your chosen device (or disabled altogether) ---
  16          
  17          
  18             COPYRIGHT
  19             ---------
  20          
  21             This code is from the book:
  22          
  23             PATTERNS FOR TIME-TRIGGERED EMBEDDED SYSTEMS by Michael J. Pont 
  24             [Pearson Education, 2001; ISBN: 0-201-33138-1].
  25          
  26             This code is copyright (c) 2001 by Michael J. Pont.
  27           
  28             See book for copyright details and other information.
  29          
  30          -*------------------------------------------------------------------*/
  31          
  32          #include "Main.h"
  33          #include "Port.h"
  34          
  35          #include "Sch51.h"
  36          
  37          // ------ Public variable definitions ------------------------------
  38          
  39          // The array of tasks
  40          sTask SCH_tasks_G[SCH_MAX_TASKS];
  41          
  42          // Used to display the error code
  43          // See Main.H for details of error codes
  44          // See Port.H for details of the error port
  45          tByte Error_code_G = 0;
  46          
  47          // ------ Private function prototypes ------------------------------
  48          
  49          static void SCH_Go_To_Sleep(void);
  50          
  51          // ------ Private variables ----------------------------------------
  52          
  53          // Keeps track of time since last error was recorded (see below)
  54          static tWord Error_tick_count_G;
  55          
C51 COMPILER V6.10  SCH51                                                                  03/16/2001 06:57:40 PAGE 2   

  56          // The code of the last error (reset after ~1 minute)
  57          static tByte Last_error_code_G;
  58          
  59          
  60          /*------------------------------------------------------------------*-
  61          
  62            SCH_Dispatch_Tasks()
  63          
  64            This is the 'dispatcher' function.  When a task (function)
  65            is due to run, SCH_Dispatch_Tasks() will run it.
  66            This function must be called (repeatedly) from the main loop.
  67          
  68          -*------------------------------------------------------------------*/
  69          void SCH_Dispatch_Tasks(void) 
  70             {
  71   1         tByte Index;
  72   1      
  73   1         // Dispatches (runs) the next task (if one is ready)
  74   1         for (Index = 0; Index < SCH_MAX_TASKS; Index++)
  75   1            {
  76   2            if (SCH_tasks_G[Index].RunMe > 0) 
  77   2               {
  78   3               (*SCH_tasks_G[Index].pTask)();  // Run the task
  79   3      
  80   3               SCH_tasks_G[Index].RunMe -= 1;   // Reset / reduce RunMe flag
  81   3      
  82   3               // Cyclic tasks will automatically run again
  83   3               // - if this is a 'one shot' task, remove it from the array
  84   3               if (SCH_tasks_G[Index].Repeat == 0)
  85   3                  {
  86   4                  SCH_Delete_Task(Index);
  87   4                  }
  88   3               }
  89   2            }
  90   1      
  91   1         // Report system status
  92   1         SCH_Report_Status();  
  93   1      
  94   1         // The scheduler enters idle mode at this point 
  95   1         SCH_Go_To_Sleep();          
  96   1         }
  97          
  98          /*------------------------------------------------------------------*-
  99          
 100            SCH_Add_Task()
 101          
 102            Causes a task (function) to be executed at regular intervals 
 103            or after a user-defined delay
 104          
 105            Fn_P   - The name of the function which is to be scheduled.
 106                     NOTE: All scheduled functions must be 'void, void' -
 107                     that is, they must take no parameters, and have 
 108                     a void return type. 
 109                             
 110            DELAY  - The interval (TICKS) before the task is first executed
 111          
 112            REPEAT - If 'REPEAT' is 0, the function is only called once,
 113                     at the time determined by 'DELAY'.  If REPEAT is non-zero,
 114                     then the function is called repeatedly at an interval
 115                     determined by the value of REPEAT (see below for examples
 116                     which should help clarify this).
 117          
C51 COMPILER V6.10  SCH51                                                                  03/16/2001 06:57:40 PAGE 3   

 118          
 119            RETURN VALUE:  
 120          
 121            Returns the position in the task array at which the task has been 
 122            added.  If the return value is SCH_MAX_TASKS then the task could 
 123            not be added to the array (there was insufficient space).  If the
 124            return value is < SCH_MAX_TASKS, then the task was added 
 125            successfully.  
 126          
 127            Note: this return value may be required, if a task is
 128            to be subsequently deleted - see SCH_Delete_Task().
 129          
 130            EXAMPLES:
 131          
 132            Task_ID = SCH_Add_Task(Do_X,1000,0);
 133            Causes the function Do_X() to be executed once after 1000 sch ticks.            
 134          
 135            Task_ID = SCH_Add_Task(Do_X,0,1000);
 136            Causes the function Do_X() to be executed regularly, every 1000 sch ticks.            
 137          
 138            Task_ID = SCH_Add_Task(Do_X,300,1000);
 139            Causes the function Do_X() to be executed regularly, every 1000 ticks.
 140            Task will be first executed at T = 300 ticks, then 1300, 2300, etc.            
 141           
 142          -*------------------------------------------------------------------*/
 143          tByte SCH_Add_Task(void (code * pFunction)(), 
 144                             const tWord DELAY, 
 145                             const tWord REPEAT)    
 146             {
 147   1         tByte Index = 0;
 148   1         
 149   1         // First find a gap in the array (if there is one)
 150   1         while ((SCH_tasks_G[Index].pTask != 0) && (Index < SCH_MAX_TASKS))
 151   1            {
 152   2            Index++;
 153   2            } 
 154   1         
 155   1         // Have we reached the end of the list?   
 156   1         if (Index == SCH_MAX_TASKS)
 157   1            {
 158   2            // Task list is full
 159   2            //
 160   2            // Set the global error variable
 161   2            Error_code_G = ERROR_SCH_TOO_MANY_TASKS;
 162   2      
 163   2            // Also return an error code
 164   2            return SCH_MAX_TASKS;  
 165   2            }
 166   1            
 167   1         // If we're here, there is a space in the task array
 168   1         SCH_tasks_G[Index].pTask  = pFunction;
 169   1           
 170   1         SCH_tasks_G[Index].Delay  = DELAY;
 171   1         SCH_tasks_G[Index].Repeat = REPEAT;
 172   1      
 173   1         SCH_tasks_G[Index].RunMe  = 0;
 174   1      
 175   1         return Index; // return position of task (to allow later deletion)
 176   1         }
 177          
 178          /*------------------------------------------------------------------*-
 179          
C51 COMPILER V6.10  SCH51                                                                  03/16/2001 06:57:40 PAGE 4   

 180            SCH_Delete_Task()
 181          
 182            Removes a task from the scheduler.  Note that this does
 183            *not* delete the associated function from memory: 
 184            it simply means that it is no longer called by the scheduler. 
 185           
 186            TASK_INDEX - The task index.  Provided by SCH_Add_Task(). 
 187          
 188            RETURN VALUE:  RETURN_ERROR or RETURN_NORMAL
 189          
 190          -*------------------------------------------------------------------*/
 191          bit SCH_Delete_Task(const tByte TASK_INDEX) 
 192             {
 193   1         bit Return_code;
 194   1      
 195   1         if (SCH_tasks_G[TASK_INDEX].pTask == 0)
 196   1            {
 197   2            // No task at this location...
 198   2            //
 199   2            // Set the global error variable
 200   2            Error_code_G = ERROR_SCH_CANNOT_DELETE_TASK;
 201   2      
 202   2            // ...also return an error code
 203   2            Return_code = RETURN_ERROR;
 204   2            }
 205   1         else
 206   1            {
 207   2            Return_code = RETURN_NORMAL;
 208   2            }      
 209   1         
 210   1         SCH_tasks_G[TASK_INDEX].pTask  = 0x0000;
 211   1         SCH_tasks_G[TASK_INDEX].Delay   = 0;
 212   1         SCH_tasks_G[TASK_INDEX].Repeat  = 0;
 213   1      
 214   1         SCH_tasks_G[TASK_INDEX].RunMe   = 0;
 215   1      
 216   1         return Return_code;       // return status
 217   1         }
 218          
 219          
 220          /*------------------------------------------------------------------*-
 221          
 222            SCH_Report_Status()
 223          
 224            Simple function to display error codes.
 225          
 226            This version displays code on a port with attached LEDs:
 227            adapt, if required, to report errors over serial link, etc.
 228          
 229            Errors are only displayed for a limited period 
 230            (60000 ticks = 1 minute at 1ms tick interval).
 231            After this the the error code is reset to 0. 
 232          
 233            This code may be easily adapted to display the last
 234            error 'for ever': this may be appropriate in your
 235            application.
 236          
 237            See Chapter 10 for further information.
 238          
 239          -*------------------------------------------------------------------*/
 240          void SCH_Report_Status(void)
 241             {
C51 COMPILER V6.10  SCH51                                                                  03/16/2001 06:57:40 PAGE 5   

 242   1      #ifdef SCH_REPORT_ERRORS
 243   1         // ONLY APPLIES IF WE ARE REPORTING ERRORS
 244   1         // Check for a new error code
 245   1         if (Error_code_G != Last_error_code_G)
 246   1            {
 247   2            // Negative logic on LEDs assumed
 248   2            Error_port = 255 - Error_code_G;
 249   2            
 250   2            Last_error_code_G = Error_code_G;
 251   2      
 252   2            if (Error_code_G != 0)
 253   2               {
 254   3               Error_tick_count_G = 60000;
 255   3               }
 256   2            else
 257   2               {
 258   3               Error_tick_count_G = 0;
 259   3               }
 260   2            }
 261   1         else
 262   1            {
 263   2            if (Error_tick_count_G != 0)
 264   2               {
 265   3               if (--Error_tick_count_G == 0)
 266   3                  {
 267   4                  Error_code_G = 0; // Reset error code
 268   4                  }
 269   3               }
 270   2            }
 271   1      #endif
 272   1         }
 273          
 274          
 275          /*------------------------------------------------------------------*-
 276          
 277            SCH_Go_To_Sleep()
 278          
 279            This scheduler enters 'idle mode' between clock ticks
 280            to save power.  The next clock tick will return the processor
 281            to the normal operating state.
 282          
 283            Note: a slight performance improvement is possible if this
 284            function is implemented as a macro, or if the code here is simply 
 285            pasted into the 'dispatch' function.  
 286          
 287            However, by making this a function call, it becomes easier 
 288            - during development - to assess the performance of the 
 289            scheduler, using the 'performance analyser' in the Keil 
 290            hardware simulator. See Chapter 14 for examples for this. 
 291          
 292            *** May wish to disable this if using a watchdog ***
 293          
 294            *** ADAPT AS REQUIRED FOR YOUR HARDWARE ***
 295          
 296          -*------------------------------------------------------------------*/
 297          void SCH_Go_To_Sleep()
 298             {
 299   1         PCON |= 0x01;    // Enter idle mode (generic 8051 version)
 300   1      
 301   1         // Entering idle mode requires TWO consecutive instructions 
 302   1         // on 80c515 / 80c505 - to avoid accidental triggering
 303   1         //PCON |= 0x01;    // Enter idle mode (#1)
C51 COMPILER V6.10  SCH51                                                                  03/16/2001 06:57:40 PAGE 6   

 304   1         //PCON |= 0x20;    // Enter idle mode (#2)
 305   1         }
 306          
 307          /*------------------------------------------------------------------*-
 308            ---- END OF FILE -------------------------------------------------
 309          -*------------------------------------------------------------------*/


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


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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲激情成人在线| 在线观看免费亚洲| 欧美日韩国产高清一区二区| 中文字幕精品一区二区精品绿巨人| 亚洲成av人在线观看| 91美女片黄在线观看91美女| 国产色产综合色产在线视频| 日韩 欧美一区二区三区| 欧美日韩国产综合一区二区三区| 中文字幕日韩精品一区| 国产九九视频一区二区三区| 9人人澡人人爽人人精品| 欧美电影免费提供在线观看| 免费成人在线播放| 日韩美女天天操| 日韩综合一区二区| 欧美一区三区四区| 日韩va欧美va亚洲va久久| 欧美二区三区的天堂| 中文字幕一区二区三区不卡在线| 丁香桃色午夜亚洲一区二区三区| 久久久久久电影| 国产99久久精品| 中文一区二区完整视频在线观看| 成人综合婷婷国产精品久久| 中文字幕一区二区视频| 欧美在线免费观看亚洲| 尤物视频一区二区| 色婷婷综合在线| 亚洲一区二区3| 日韩一区二区免费电影| 香蕉av福利精品导航| 4438x成人网最大色成网站| 亚洲成人tv网| 在线精品视频一区二区三四| 自拍偷自拍亚洲精品播放| 欧美伊人久久大香线蕉综合69 | 国产精品久久久久久久久久免费看 | 欧美日韩在线播放| 偷窥少妇高潮呻吟av久久免费| 精品视频123区在线观看| 美女视频黄免费的久久| 中文字幕精品在线不卡| 欧美色综合网站| 麻豆久久一区二区| 国产精品乱子久久久久| 欧美在线色视频| 天天做天天摸天天爽国产一区| 欧美大胆一级视频| 亚洲国产成人porn| 欧美日本一区二区三区四区 | 综合网在线视频| 欧美日本免费一区二区三区| 精品一区二区在线看| 国产精品久久看| 欧美一区二区三区色| 岛国一区二区三区| 亚洲在线一区二区三区| 亚洲精品一线二线三线无人区| 国产精品18久久久久久久久| 一区二区三区国产豹纹内裤在线| 精品免费国产一区二区三区四区| 99久久婷婷国产综合精品电影 | 国产亚洲精品免费| 欧美日韩一级二级三级| 麻豆国产欧美日韩综合精品二区 | 国产亚洲一区二区在线观看| 欧美性猛交一区二区三区精品| 黄色资源网久久资源365| 亚洲国产日韩在线一区模特| 国产日韩欧美麻豆| 56国语精品自产拍在线观看| 成人黄色国产精品网站大全在线免费观看| 亚洲激情中文1区| 国产日产亚洲精品系列| 欧美xxxxx牲另类人与| 欧美中文字幕久久| jlzzjlzz亚洲日本少妇| 韩国成人精品a∨在线观看| 亚洲国产乱码最新视频| 国产精品久久夜| 国产亚洲欧美色| 337p粉嫩大胆色噜噜噜噜亚洲 | 国产精品久久一卡二卡| 久久久综合激的五月天| 欧美大片一区二区| 欧美一区二区视频网站| 欧美日韩dvd在线观看| 日本韩国欧美在线| av在线综合网| 成人av在线网站| 成人性生交大片免费看视频在线| 另类小说色综合网站| 天堂成人国产精品一区| 亚洲不卡在线观看| 国产精品麻豆久久久| 欧美亚洲图片小说| 欧美日韩国产首页| 欧美日韩久久久一区| 色诱视频网站一区| 91黄色激情网站| 在线影视一区二区三区| 色噜噜久久综合| 在线视频一区二区三| 在线视频你懂得一区| 欧美自拍丝袜亚洲| 欧美日韩电影在线| 欧美一区二区高清| 日韩欧美亚洲一区二区| 欧美精品一区二区三区一线天视频| 日韩女优视频免费观看| 日韩美女天天操| 久久久不卡网国产精品一区| 精品国产一区久久| 久久综合九色综合97婷婷女人 | 亚洲福利视频一区二区| 亚洲r级在线视频| 日本少妇一区二区| 麻豆精品视频在线观看| 国产麻豆9l精品三级站| 成人久久18免费网站麻豆| 色噜噜狠狠色综合中国| 欧美精品三级在线观看| 精品三级在线观看| 亚洲国产成人一区二区三区| 久久久国际精品| 国产精品久久久久久久岛一牛影视 | 欧美性猛片aaaaaaa做受| 欧美高清精品3d| 久久久久国产成人精品亚洲午夜| 中文字幕第一区第二区| 亚洲国产精品一区二区久久恐怖片 | 一区二区高清视频在线观看| 日本成人在线视频网站| 国产成人在线观看免费网站| 99久久精品免费| 欧美一区在线视频| 欧美国产成人在线| 亚洲成av人影院在线观看网| 国产一区不卡在线| 在线观看一区不卡| 日韩视频在线观看一区二区| 久久精品视频一区二区| 一区二区三区在线观看网站| 精品一区二区综合| 日本久久一区二区三区| 精品国一区二区三区| 亚洲综合图片区| 国产黄色成人av| 91麻豆精品国产91久久久更新时间| 久久久亚洲国产美女国产盗摄| 国产精品拍天天在线| 五月综合激情网| 91在线观看视频| 精品国产乱子伦一区| 午夜激情一区二区| 欧美精品自拍偷拍| 国产精品国产三级国产有无不卡| 亚洲综合图片区| 蜜臀av一区二区三区| 欧美影片第一页| 亚洲成人先锋电影| 精品污污网站免费看| 亚洲精品日产精品乱码不卡| jizz一区二区| 国产精品不卡一区二区三区| 成人精品gif动图一区| 国产精品午夜在线观看| 国产91对白在线观看九色| 久久这里只有精品6| 国产一区在线精品| 国产欧美一区二区精品秋霞影院| 国产精品一线二线三线精华| 久久你懂得1024| 春色校园综合激情亚洲| 欧美国产精品久久| 99久久免费视频.com| 亚洲欧美色一区| 欧美日韩免费一区二区三区视频| 亚洲综合久久久久| 欧美日韩激情在线| 男女男精品视频| 精品国产乱码久久久久久免费| 国内不卡的二区三区中文字幕 | 日本一区二区三区免费乱视频 | 精品久久久久久久久久久院品网| 久久99国产精品麻豆| 久久久www成人免费毛片麻豆| 丰满白嫩尤物一区二区| 中文字幕制服丝袜一区二区三区| 91丨porny丨蝌蚪视频| 亚洲一区二区三区在线看| 欧美精品一二三| 国产精品 日产精品 欧美精品| 中文字幕av资源一区| 欧美系列亚洲系列| 毛片av中文字幕一区二区| 国产精品亲子乱子伦xxxx裸| 久久这里只有精品视频网| 成人免费黄色在线|