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

📄 os_core.lst

📁 ucOS 模拟环境
💻 LST
📖 第 1 页 / 共 5 页
字号:
H8S,H8/300 SERIES C/C++ COMPILER (V.6.01.02.003)   28-Mar-2008 19:31:44 PAGE   1

************ SOURCE LISTING ************

      Line Pi 0----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+--
FILE NAME: E:\Study\ucOS-II\ucOS-II\ucOS kernel\Task\os_core.c
         1     /*
         2     *********************************************************************************************************
         3     *                                                uC/OS-II
         4     *                                          The Real-Time Kernel
         5     *                                             CORE FUNCTIONS
         6     *
         7     *                          (c) Copyright 1992-2005, Jean J. Labrosse, Weston, FL
         8     *                                           All Rights Reserved
         9     *
        10     * File    : OS_CORE.C
        11     * By      : Jean J. Labrosse
        12     * Version : V2.80
        13     *********************************************************************************************************
        14     */
        15     
        16     #ifndef  OS_MASTER_FILE
        17     #define  OS_GLOBALS
        18     #include <ucos_ii.h>
FILE NAME: E:\Study\ucOS-II\ucOS-II\ucOS kernel\ucos_ii.h
         1     /*
         2     *********************************************************************************************************
         3     *                                                uC/OS-II
         4     *                                          The Real-Time Kernel
         5     *
         6     *                          (c) Copyright 1992-2005, Jean J. Labrosse, Weston, FL
         7     *                                           All Rights Reserved
         8     *
         9     * File    : uCOS_II.H
        10     * By      : Jean J. Labrosse
        11     * Version : V2.80
        12     *********************************************************************************************************
        13     */
        14     
        15     #ifndef   OS_uCOS_II_H
        16     #define   OS_uCOS_II_H
        17     
        18     /*
        19     *********************************************************************************************************
        20     *                                          uC/OS-II VERSION NUMBER
        21     *********************************************************************************************************
        22     */
        23     
        24     #define  OS_VERSION                 280u                /* Version of uC/OS-II (Vx.yy mult. by 100)    */
        25     
        26     /*
        27     *********************************************************************************************************
        28     *                                           INCLUDE HEADER FILES
        29     *********************************************************************************************************
        30     */
        31     
        32     #include  <os_cpu.h>
FILE NAME: E:\Study\ucOS-II\ucOS-II\PLATFORM\CPU\os_cpu.h
         1     /*
         2     *********************************************************************************************************
         3     *                                               uC/OS-II
         4     *                                        The Real-Time Kernel
         5     *
         6     *                            (c) Copyright 2003, Micrium, Inc., Weston, FL
         7     *                                          All Rights Reserved
         8     *
         9     *                                         H8/300  Specific code
        10     *
        11     * File         : OS_CPU.H
        12     * By           : Jean J. Labrosse
        13     *********************************************************************************************************
        14     */
        15     
        16     #ifndef OS_CPU_H
        17     #define OS_CPU_H
        18     
        19     #ifdef   OS_CPU_GLOBALS
        20 X   #define  OS_CPU_EXT
        21     #else
        22     #define  OS_CPU_EXT  extern
        23     #endif
        24     
        25     /*
        26     *********************************************************************************************************
        27     *                                              DATA TYPES
        28     *********************************************************************************************************
        29     */
        30     
        31     typedef unsigned   char   BOOLEAN;
        32     typedef  unsigned  char   INT8U;                 /* Unsigned  8 bit quantity                           */
        33     typedef  signed    char   INT8S;                 /* Signed    8 bit quantity                           */
        34     typedef  unsigned  short  INT16U;                /* Unsigned 16 bit quantity                           */
        35     typedef  signed    short  INT16S;                /* Signed   16 bit quantity                           */
        36     typedef  unsigned  long   INT32U;                /* Unsigned 32 bit quantity                           */
        37     typedef  signed    long   INT32S;                /* Signed   32 bit quantity                           */
        38     typedef  float            FP32;                  /* Single precision floating point                    */
        39     typedef  double           FP64;                  /* Double precision floating point                    */
        40     
        41     typedef  unsigned  short  OS_STK;                /* Each stack entry is 16-bit wide                    */
        42     typedef  unsigned  char   OS_CPU_SR;             /* CPU Status Register                                */
        43     
        44     /*
        45     *********************************************************************************************************
        46     *                                              CONSTANTS
        47     *********************************************************************************************************
        48     */
        49     
        50     #ifndef  FALSE
        51     #define  FALSE    0
        52     #endif
        53     
        54     #ifndef  TRUE
        55     #define  TRUE     1
        56     #endif
        57     
        58     /*
        59     *********************************************************************************************************
        60     *                                               MACROS
        61     *                                         (H8-300 Specific)
        62     * 
        63     * Note(s) : OS_CRITICAL_METHOD:  
        64     *                Method #1:
        65     *                            ENTER:    DISABLE interrupts
        66     *                            EXIT :    ENABLE  interrupts
        67     *                Method #2:
        68     *                            ENTER: a) Save the CCR onto the stack
        69     *                                   b) DISABLE interrupts
        70     *                            EXIT :    Restore the CCR from the stack
        71     *                Method #3:
        72     *                            ENTER: a) Save the CCR into a LOCAL variable which is ALWAYS 
        73     *                                      assumed to be called 'cpu_sr' 
        74     *                                   b) DISABLE interrupts
        75     *                            EXIT :    Restore the CCR from 'cpu_sr'
        76     *********************************************************************************************************
        77     */
        78     
        79     
        80     #define  OS_CRITICAL_METHOD      3
        81     
        82     #define  OS_ENTER_CRITICAL()  cpu_sr = OSCPUSaveSR()        /* Disable interrupts                      */
        83     #define  OS_EXIT_CRITICAL()   OSCPURestoreSR(cpu_sr)        /* Enable  interrupts                      */
        84     
        85     #define  OS_TASK_SW()          OSCtxSw()
        86     
        87     #define  OS_STK_GROWTH           1                          /* Define stack growth: 1 = Down, 0 = Up   */
        88     
        89     void     Tmr_Init(void);                         /* Timer services                                     */
        90     void     Tmr_ISRClr(void);
        91     
        92     
        93     
        94     
        95     /* 
        96     *********************************************************************************************************
        97     *                                             PROTOTYPES
        98     *********************************************************************************************************
        99     */
       100  E  #if      3 == 3
       101     OS_CPU_SR  OSCPUSaveSR(void);                    /* Return the value of the CCR register and then ...  */
       102                                                      /* ... disable interrupts.                            */
       103     void       OSCPURestoreSR(OS_CPU_SR os_cpu_sr);  /* Set CCR register to 'os_cpu_sr'                    */
       104     #endif
       105     #endif
       106     
FILE NAME: E:\Study\ucOS-II\ucOS-II\ucOS kernel\ucos_ii.h
        33     #include  <os_cfg.h>
FILE NAME: E:\Study\ucOS-II\ucOS-II\PLATFORM\Public\os_cfg.h
         1     /*
         2     *********************************************************************************************************
         3     *                                           
         4     *
         5     * File : OS_CFG.H
         6     * By   : Dengtieshan  2008-3-24 
         7     
         8     *********************************************************************************************************
         9     */
        10     
        11     #ifndef OS_CFG_H
        12     #define OS_CFG_H
        13                                            /* ----------------------- uC/OS-View ------------------------- */
        14     #define OS_VIEW_MODULE            0    /* When 1, indicate that uC/OS-View is present                  */
        15     
        16                                            /* ---------------------- MISCELLANEOUS ----------------------- */
        17     #define OS_ARG_CHK_EN             0    /* Enable (1) or Disable (0) argument checking                  */
        18     #define OS_CPU_HOOKS_EN           0    /* uC/OS-II hooks are found in the processor port files         */
        19     
        20     #define OS_DEBUG_EN               0    /* Enable(1) debug variables                                    */
        21     
        22     #define OS_EVENT_NAME_SIZE        0    /* Determine the size of the name of a Sem, Mutex, Mbox or Q    */
        23     
        24     #define OS_LOWEST_PRIO            4    /* Defines the lowest priority that can be assigned ...         */
        25                                            /* ... MUST NEVER be higher than 63!                            */
        26     
        27     #define OS_MAX_EVENTS             5    /* Max. number of event control blocks in your application      */
        28     #define OS_MAX_FLAGS              0    /* Max. number of Event Flag Groups    in your application      */
        29     #define OS_MAX_MEM_PART           0    /* Max. number of memory partitions                             */
        30     #define OS_MAX_QS                 2    /* Max. number of queue control blocks in your application      */
        31     #define OS_MAX_TASKS              3    /* Max. number of tasks in your application, MUST be >= 2       */
        32     
        33     #define OS_SCHED_LOCK_EN          0    /*     Include code for OSSchedLock() and OSSchedUnlock()       */
        34     
        35     #define OS_TASK_IDLE_STK_SIZE    25    /* Idle task stack size (# of OS_STK wide entries)              */
        36     
        37     #define OS_TASK_STAT_EN           1    /* Enable (1) or Disable(0) the statistics task                 */
        38     #define OS_TASK_STAT_STK_SIZE    50    /* Statistics task stack size (# of OS_STK wide entries)        */
        39     #define OS_TASK_STAT_STK_CHK_EN   0    /* Check task stacks from statistic task                        */
        40     
        41     #define OS_TICK_STEP_EN           0    /* Enable tick stepping feature for uC/OS-View                  */
        42     #define OS_TICKS_PER_SEC         75    /* Set the number of ticks in one second                        */
        43     
        44     
        45                                            /* ----------------------- EVENT FLAGS ------------------------ */
        46     #define OS_FLAG_EN                1    /* Enable (1) or Disable (0) code generation for EVENT FLAGS    */
        47     #define OS_FLAG_WAIT_CLR_EN       1    /* Include code for Wait on Clear EVENT FLAGS                   */
        48     #define OS_FLAG_ACCEPT_EN         1    /*     Include code for OSFlagAccept()                          */
        49     #define OS_FLAG_DEL_EN            1    /*     Include code for OSFlagDel()                             */

⌨️ 快捷键说明

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