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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? sch51.lst

?? 時間觸發(fā)嵌入式系統(tǒng)設計模式源碼
?? LST
字號:
C51 COMPILER V6.10  SCH51                                                                  04/19/2001 13:56:36 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(SIZE) 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                                                                  04/19/2001 13:56:36 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               // Periodic 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].Period == 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            PERIOD - If 'PERIOD' is 0, the function is only called once,
 113                     at the time determined by 'DELAY'.  If PERIOD is non-zero,
 114                     then the function is called repeatedly at an interval
 115                     determined by the value of PERIOD (see below for examples
 116                     which should help clarify this).
 117          
C51 COMPILER V6.10  SCH51                                                                  04/19/2001 13:56:36 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 PERIOD)    
 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].Period = PERIOD;
 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                                                                  04/19/2001 13:56:36 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].Period  = 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                                                                  04/19/2001 13:56:36 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                                                                  04/19/2001 13:56:36 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        =    310    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =     18       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一区二区三区免费野_久草精品视频
日本伦理一区二区| 成人在线视频一区| 久久看人人爽人人| 欧美日韩在线电影| 不卡视频在线看| 麻豆精品在线播放| 亚洲免费观看在线观看| 精品黑人一区二区三区久久| 色综合天天视频在线观看| 狠狠色丁香久久婷婷综合_中| 亚洲欧美国产77777| 久久综合久久综合久久| 欧美日韩一区二区欧美激情| av毛片久久久久**hd| 国内外成人在线| 日韩中文字幕麻豆| 亚洲一区二区三区国产| 中文字幕一区二区不卡| 久久亚洲春色中文字幕久久久| 欧美伦理电影网| 91美女视频网站| jiyouzz国产精品久久| 久久99精品久久久久久 | 午夜精品在线看| 亚洲免费在线视频| 国产精品白丝在线| 国产视频一区在线播放| 精品88久久久久88久久久| 在线不卡免费av| 欧美日韩一区二区在线观看| 色呦呦国产精品| 不卡一区中文字幕| 9色porny自拍视频一区二区| 丁香桃色午夜亚洲一区二区三区| 久久精品国产一区二区三| 亚洲不卡av一区二区三区| 一区二区三区蜜桃| 亚洲日本在线观看| 亚洲欧洲精品成人久久奇米网| 国产亚洲精品aa午夜观看| 久久精品人人做人人综合| 亚洲精品一区二区三区四区高清| 日韩视频一区二区三区在线播放 | 久久精品99久久久| 裸体在线国模精品偷拍| 免费在线观看精品| 美女在线视频一区| 久久99九九99精品| 国产成人午夜电影网| 成人免费观看视频| 91小视频在线| 欧美视频一区二区三区四区| 欧美日韩高清一区二区| 欧美一区二区三区视频在线观看| 91精品国产综合久久香蕉的特点 | 欧美在线视频不卡| 欧美日韩国产小视频在线观看| 欧美日韩国产另类不卡| 51久久夜色精品国产麻豆| 91麻豆精品国产91久久久久| 亚洲精品在线观看视频| 国产亚洲女人久久久久毛片| √…a在线天堂一区| 亚洲影视在线播放| 热久久国产精品| 粉嫩蜜臀av国产精品网站| 91在线观看免费视频| 欧美在线观看禁18| 日韩欧美国产不卡| 中文天堂在线一区| 亚洲成人免费av| 国产综合久久久久影院| k8久久久一区二区三区 | 国产乱人伦偷精品视频免下载| 国产成人av影院| 色呦呦网站一区| 日韩精品一区二区三区老鸭窝| 国产女人18水真多18精品一级做| 一区二区在线观看免费视频播放| 偷拍一区二区三区| 国产成人亚洲精品狼色在线| 在线观看日韩av先锋影音电影院| 91精品国产综合久久福利软件| 久久久久久电影| 一区二区三区四区不卡视频| 久久精品国产一区二区| 99国产精品久久久久久久久久| 欧美日韩成人激情| 国产精品欧美一区二区三区| 亚洲成人av福利| 懂色av噜噜一区二区三区av| 欧美视频日韩视频| 亚洲国产成人一区二区三区| 亚洲国产wwwccc36天堂| 国产宾馆实践打屁股91| 欧美精品v国产精品v日韩精品| 久久老女人爱爱| 男人的j进女人的j一区| 色婷婷av久久久久久久| 久久久国产精华| 男女视频一区二区| 欧洲av一区二区嗯嗯嗯啊| 国产亚洲一区二区三区在线观看| 亚洲国产毛片aaaaa无费看| 国产精品99久| 欧美成人猛片aaaaaaa| 亚洲自拍偷拍网站| 播五月开心婷婷综合| 久久综合九色欧美综合狠狠| 久久不见久久见免费视频7| 91看片淫黄大片一级在线观看| 精品粉嫩超白一线天av| 丝袜脚交一区二区| 色乱码一区二区三区88| 国产女主播一区| 国产精品资源网| 日韩免费高清电影| 日韩av不卡在线观看| 91国偷自产一区二区三区成为亚洲经典| 久久欧美中文字幕| 精品一区二区在线视频| 欧美一区二区在线播放| 午夜国产精品影院在线观看| 色先锋资源久久综合| 亚洲欧洲性图库| 国产精品一区二区男女羞羞无遮挡| 制服丝袜日韩国产| 香蕉久久一区二区不卡无毒影院| 在线观看一区二区精品视频| 1024成人网| 色综合视频在线观看| 最新中文字幕一区二区三区 | 欧美一区日韩一区| 午夜精品一区二区三区免费视频| 色老综合老女人久久久| 亚洲三级电影网站| 色老汉av一区二区三区| 亚洲欧美日韩电影| 欧亚洲嫩模精品一区三区| 亚洲黄色av一区| 91性感美女视频| 亚洲一区在线观看视频| 欧美日韩精品二区第二页| 天天综合网 天天综合色| 欧美一区二区在线看| 国内偷窥港台综合视频在线播放| 国产日韩欧美电影| av电影在线观看一区| 亚洲色图欧美偷拍| 欧美日韩在线直播| 麻豆精品在线看| 国产精品人人做人人爽人人添 | 成人午夜av电影| 亚洲欧美综合色| 欧美午夜不卡在线观看免费| 日韩精品成人一区二区三区| 日韩欧美一二三四区| 精品一区二区三区的国产在线播放 | 99久久亚洲一区二区三区青草| 中文一区二区在线观看| 91丨九色丨尤物| 亚洲亚洲人成综合网络| 欧美电影免费观看高清完整版在线观看| 精品中文字幕一区二区小辣椒 | 日韩毛片视频在线看| 欧美日韩欧美一区二区| 久久99国产精品久久99果冻传媒| 国产日韩亚洲欧美综合| 色综合色综合色综合| 日本午夜一本久久久综合| 久久精品免视看| 欧美色偷偷大香| 国产一区二区三区黄视频 | 国产精品久久久久久久久久久免费看| 国产98色在线|日韩| 欧美激情在线观看视频免费| 久久色中文字幕| 粉嫩一区二区三区在线看| 亚洲视频每日更新| 日韩一区国产二区欧美三区| 国产一区二区精品在线观看| 国产精品乱码一区二区三区软件| 国产资源在线一区| 亚洲一二三区不卡| 欧美xfplay| 99精品视频在线观看免费| 日本一不卡视频| 久久久久久99精品| 色婷婷激情综合| 精品午夜一区二区三区在线观看| 中文字幕av资源一区| 欧美精选一区二区| 日本视频中文字幕一区二区三区| 中日韩免费视频中文字幕| 欧美影院午夜播放| 国产精品一区二区久久精品爱涩| 亚洲午夜在线观看视频在线| 欧美mv日韩mv亚洲| 96av麻豆蜜桃一区二区| 亚洲国产精品麻豆|