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

📄 scheduler.lst

📁 这是atmel公司的89C51SND1C的mp3源程序
💻 LST
📖 第 1 页 / 共 2 页
字号:
C51 COMPILER V6.20c  SCHEDULER                                                             07/10/2002 15:17:30 PAGE 1   


C51 COMPILER V6.20c, COMPILATION OF MODULE SCHEDULER
OBJECT MODULE PLACED IN ..\obj\scheduler.obj
COMPILER INVOKED BY: C:\KEIL\C51\BIN\C51.EXE ..\src\system\scheduler.c BROWSE INCDIR(..\src\system;..\..\..\lib) DEFINE(
                    -KEIL) DEBUG OBJECTEXTEND PRINT(.\scheduler.lst) OBJECT(..\obj\scheduler.obj) 

stmt level    source

   1          /*C**************************************************************************
   2          * $RCSfile: scheduler.c,v $
   3          *----------------------------------------------------------------------------
   4          * Copyright (c) 2002 Atmel.
   5          *----------------------------------------------------------------------------
   6          * RELEASE:      $Name: DEMO_FAT_1_2_5 $      
   7          * REVISION:     $Revision: 1.3 $     
   8          * FILE_CVSID:   $Id: scheduler.c,v 1.3 2002/06/06 15:33:00 ffosse Exp $       
   9          *----------------------------------------------------------------------------
  10          * PURPOSE:
  11          * This file contains the scheduler routines
  12          *
  13          * NOTES:
  14          * Configuration:
  15          *   - SCH_TYPE in scheduler.h header file
  16          *   - SCH_TIMER in scheduler.h header file
  17          * Global Variables:
  18          *   - gl_cpt_tick: byte in data space
  19          *   - gl_kbd_tick: byte in data space
  20          *   - gl_mem_tick: byte in data space
  21          *
  22          *****************************************************************************/
  23          
  24          /*_____ I N C L U D E S ____________________________________________________*/
  25          
  26          #include "config.h"                         /* system definition */
  27          #include "..\..\..\..\lib\timer\timer_drv.h"/* timer definition */
  28          #include "scheduler.h"                      /* scheduler definition */
  29          
  30          
  31          /*_____ M A C R O S ________________________________________________________*/
  32          
  33          
  34          /*_____ D E F I N I T I O N ________________________________________________*/
  35          
  36          extern  data    Byte    gl_cpt_tick;        /* general tick counter */
  37          extern  data    Byte    gl_kbd_tick;        /* keypad tick counter */
  38          extern  data    Byte    gl_mem_tick;        /* memory tick counter */
  39          extern  data    Byte    gl_wa_tick;         /* workaround tick counter */
  40          
  41          #if (SCH_TYPE != SCH_FREE)
                bit   sch_tick_flag;
              #endif
  44          
  45          /*_____ D E C L A R A T I O N ______________________________________________*/
  46          
  47          static  void sch_time_init (void);
  48          
  49          
  50          /*F**************************************************************************
  51          * NAME:     sch_scheduler_init
  52          *----------------------------------------------------------------------------
  53          * PARAMS:
  54          *
C51 COMPILER V6.20c  SCHEDULER                                                             07/10/2002 15:17:30 PAGE 2   

  55          * return:
  56          *----------------------------------------------------------------------------
  57          * PURPOSE: 
  58          *   Scheduler initialization
  59          *----------------------------------------------------------------------------
  60          * EXAMPLE:
  61          *----------------------------------------------------------------------------
  62          * NOTE:
  63          *   Task_x_init() and Task_x_fct() are defined in scheduler.h
  64          *----------------------------------------------------------------------------
  65          * REQUIREMENTS:
  66          *****************************************************************************/
  67          void sch_scheduler_init (void)
  68          {
  69   1        Task_1_init();  
  70   1        Task_2_init();  
  71   1        Task_3_init();  
  72   1        Task_4_init();  
  73   1        Task_5_init();  
  74   1        Task_6_init();  
  75   1        Task_7_init();  
  76   1        Task_8_init();  
  77   1        Task_9_init();  
  78   1        Task_10_init();
  79   1      #if (SCH_TYPE != SCH_FREE)
                sch_tick_flag = FALSE;
              #endif
  82   1        sch_time_init();                /* start time base */
  83   1      }
  84          
  85          
  86          /*F**************************************************************************
  87          * NAME:     sch_scheduler
  88          *----------------------------------------------------------------------------
  89          * PARAMS:
  90          *
  91          * return:
  92          *----------------------------------------------------------------------------
  93          * PURPOSE:
  94          *   Task execution scheduler 
  95          *----------------------------------------------------------------------------
  96          * EXAMPLE:
  97          *----------------------------------------------------------------------------
  98          * NOTE:
  99          *----------------------------------------------------------------------------
 100          * REQUIREMENTS:
 101          *****************************************************************************/
 102          void sch_scheduler (void)
 103          {
 104   1        while (1)
 105   1        {
 106   2          Task_1_fct();
 107   2          Sch_call_next_task();
 108   2      
 109   2          Task_2_fct();
 110   2          Sch_call_next_task();
 111   2      
 112   2          Task_3_fct();
 113   2          Sch_call_next_task();
 114   2        
 115   2          Task_4_fct();
 116   2          Sch_call_next_task();
C51 COMPILER V6.20c  SCHEDULER                                                             07/10/2002 15:17:30 PAGE 3   

 117   2        
 118   2          Task_5_fct();
 119   2          Sch_call_next_task();
 120   2        
 121   2          Task_6_fct();
 122   2          Sch_call_next_task();
 123   2        
 124   2          Task_7_fct();
 125   2          Sch_call_next_task();
 126   2        
 127   2          Task_8_fct();
 128   2          Sch_call_next_task();
 129   2        
 130   2          Task_9_fct();
 131   2          Sch_call_next_task();
 132   2        
 133   2          Task_10_fct();
 134   2          Sch_call_next_task();
 135   2      
 136   2          Sch_new_schedule();
 137   2        }
 138   1      }
 139          
 140          
 141          /*F**************************************************************************
 142          * NAME:    sch_default_fct
 143          *----------------------------------------------------------------------------
 144          * PARAMS:
 145          *
 146          * return:
 147          *----------------------------------------------------------------------------
 148          * PURPOSE:
 149          *   This function does nothing 
 150          *----------------------------------------------------------------------------
 151          * EXAMPLE:
 152          *----------------------------------------------------------------------------
 153          * NOTE:
 154          *----------------------------------------------------------------------------
 155          * REQUIREMENTS:
 156          *****************************************************************************/
 157          void sch_default_fct (void)
 158          {
 159   1      }
 160          
 161          
 162          #if (SCH_TIMER == SCH_TIMER0)
 163          /*F**************************************************************************
 164          * NAME:     sch_time_init
 165          *----------------------------------------------------------------------------
 166          * PARAMS:
 167          *
 168          * return:
 169          *----------------------------------------------------------------------------
 170          * PURPOSE:
 171          *   Scheduler time base (timer 0) initialization
 172          *----------------------------------------------------------------------------
 173          * EXAMPLE:
 174          *----------------------------------------------------------------------------
 175          * NOTE:
 176          *   mode 16-bit Timer, Time counter
 177          *   T0_PRIO to be defined in config.h
 178          *   TIM_LOW & TIM_HIGH defined in scheduler.h

⌨️ 快捷键说明

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