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

📄 os_task.lst

📁 ucOS 模拟环境
💻 LST
📖 第 1 页 / 共 5 页
字号:
        50     #define OS_FLAG_NAME_SIZE         0    /*     Determine the size of the name of an event flag group    */
        51     #define OS_FLAG_QUERY_EN          1    /*     Include code for OSFlagQuery()                           */
        52  E  #if     280u >= 280
        53     #define OS_FLAGS_NBITS           16    /* Size in #bits of OS_FLAGS data type (8, 16 or 32)            */
        54     #endif
        55     
        56                                            /* -------------------- MESSAGE MAILBOXES --------------------- */
        57     #define OS_MBOX_EN                1    /* Enable (1) or Disable (0) code generation for MAILBOXES      */
        58     #define OS_MBOX_ACCEPT_EN         1    /*     Include code for OSMboxAccept()                          */
        59     #define OS_MBOX_DEL_EN            1    /*     Include code for OSMboxDel()                             */
        60     #define OS_MBOX_POST_EN           1    /*     Include code for OSMboxPost()                            */
        61     #define OS_MBOX_POST_OPT_EN       1    /*     Include code for OSMboxPostOpt()                         */
        62     #define OS_MBOX_QUERY_EN          1    /*     Include code for OSMboxQuery()                           */
        63     
        64     
        65                                            /* --------------------- MEMORY MANAGEMENT -------------------- */
        66     #define OS_MEM_EN                 1    /* Enable (1) or Disable (0) code generation for MEMORY MANAGER */
        67     #define OS_MEM_QUERY_EN           1    /*     Include code for OSMemQuery()                            */
        68     #define OS_MEM_NAME_SIZE          0    /*     Determine the size of a memory partition name            */
        69     
        70     
        71                                            /* ---------------- MUTUAL EXCLUSION SEMAPHORES --------------- */
        72     #define OS_MUTEX_EN               1    /* Enable (1) or Disable (0) code generation for MUTEX          */
        73     #define OS_MUTEX_ACCEPT_EN        1    /*     Include code for OSMutexAccept()                         */
        74     #define OS_MUTEX_DEL_EN           1    /*     Include code for OSMutexDel()                            */
        75     #define OS_MUTEX_QUERY_EN         1    /*     Include code for OSMutexQuery()                          */
        76     
        77     
        78                                            /* ---------------------- MESSAGE QUEUES ---------------------- */
        79     #define OS_Q_EN                   1    /* Enable (1) or Disable (0) code generation for QUEUES         */
        80     #define OS_Q_ACCEPT_EN            1    /*     Include code for OSQAccept()                             */
        81     #define OS_Q_DEL_EN               1    /*     Include code for OSQDel()                                */
        82     #define OS_Q_FLUSH_EN             1    /*     Include code for OSQFlush()                              */
        83     #define OS_Q_POST_EN              1    /*     Include code for OSQPost()                               */
        84     #define OS_Q_POST_FRONT_EN        1    /*     Include code for OSQPostFront()                          */
        85     #define OS_Q_POST_OPT_EN          1    /*     Include code for OSQPostOpt()                            */
        86     #define OS_Q_QUERY_EN             1    /*     Include code for OSQQuery()                              */
        87     
        88     
        89                                            /* ------------------------ SEMAPHORES ------------------------ */
        90     #define OS_SEM_EN                 1    /* Enable (1) or Disable (0) code generation for SEMAPHORES     */
        91     #define OS_SEM_ACCEPT_EN          1    /*    Include code for OSSemAccept()                            */
        92     #define OS_SEM_DEL_EN             1    /*    Include code for OSSemDel()                               */
        93     #define OS_SEM_QUERY_EN           1    /*    Include code for OSSemQuery()                             */
        94     #define OS_SEM_SET_EN             1    /*    Include code for OSSemSet()                               */
        95     
        96                                            /* --------------------- TASK MANAGEMENT ---------------------- */
        97     #define OS_TASK_CHANGE_PRIO_EN    0    /*     Include code for OSTaskChangePrio()                      */
        98     #define OS_TASK_CREATE_EN         1    /*     Include code for OSTaskCreate()                          */
        99     #define OS_TASK_CREATE_EXT_EN     0    /*     Include code for OSTaskCreateExt()                       */
       100     #define OS_TASK_DEL_EN            0    /*     Include code for OSTaskDel()                             */
       101     #define OS_TASK_NAME_SIZE         0    /*     Determine the size of a task name                        */
       102     #define OS_TASK_PROFILE_EN        0    /*     Include variables in OS_TCB for profiling                */
       103     #define OS_TASK_QUERY_EN          0    /*     Include code for OSTaskQuery()                           */
       104     #define OS_TASK_SUSPEND_EN        0    /*     Include code for OSTaskSuspend() and OSTaskResume()      */
       105     #define OS_TASK_SW_HOOK_EN        1    /*     Include code for OSTaskSwHook()                          */
       106     
       107     
       108                                            /* --------------------- TIME MANAGEMENT ---------------------- */
       109     #define OS_TIME_DLY_HMSM_EN       0    /*     Include code for OSTimeDlyHMSM()                         */
       110     #define OS_TIME_DLY_RESUME_EN     0    /*     Include code for OSTimeDlyResume()                       */
       111     #define OS_TIME_GET_SET_EN        0    /*     Include code for OSTimeGet() and OSTimeSet()             */
       112     #define OS_TIME_TICK_HOOK_EN      1    /*     Include code for OSTimeTickHook()                        */
       113     
       114     
       115  E  #if     280u < 280
       116 X   typedef INT16U             OS_FLAGS;
       117     #endif
       118     
       119     /* window and message API   2008    */
       120     #define     X_WINDOW_EN          1
       121     #define     DEVICE_MANAGE_EN     1
       122     #define     DEVICE_MAX           2
       123     
       124     
       125     #endif
FILE NAME: E:\Study\ucOS-II\ucOS-II\ucOS kernel\ucos_ii.h
        34     
        35     #ifdef __cplusplus
        36 X   extern "C" {
        37     #endif
        38     
        39     /*
        40     *********************************************************************************************************
        41     *                                             MISCELLANEOUS
        42     *********************************************************************************************************
        43     */
        44     
        45     #ifdef   OS_GLOBALS
        46 X   #define  OS_EXT
        47     #else
        48     #define  OS_EXT  extern
        49     #endif
        50     
        51     #ifndef  FALSE
        52 X   #define  FALSE                        0u
        53     #endif
        54     
        55     #ifndef  TRUE
        56 X   #define  TRUE                         1u
        57     #endif
        58     
        59     #define  OS_ASCII_NUL          (INT8U)0
        60     
        61     #define  OS_PRIO_SELF              0xFFu                /* Indicate SELF priority                      */
        62     
        63  E  #if 1 > 0
        64     #define  OS_N_SYS_TASKS               2u                /* Number of system tasks                      */
        65     #else
        66 X   #define  OS_N_SYS_TASKS               1u
        67     #endif
        68     
        69     #define  OS_STAT_PRIO       (OS_LOWEST_PRIO - 1)        /* Statistic task priority                     */
        70     #define  OS_IDLE_PRIO       (OS_LOWEST_PRIO)            /* IDLE      task priority                     */
        71     
        72  E  #if 4 <= 63
        73     #define  OS_EVENT_TBL_SIZE ((OS_LOWEST_PRIO) / 8 + 1)   /* Size of event table                         */
        74     #define  OS_RDY_TBL_SIZE   ((OS_LOWEST_PRIO) / 8 + 1)   /* Size of ready table                         */
        75     #else
        76 X   #define  OS_EVENT_TBL_SIZE ((OS_LOWEST_PRIO) / 16 + 1)  /* Size of event table                         */
        77 X   #define  OS_RDY_TBL_SIZE   ((OS_LOWEST_PRIO) / 16 + 1)  /* Size of ready table                         */
        78     #endif
        79     
        80     #define  OS_TASK_IDLE_ID          65535u                /* I.D. numbers for Idle and Stat tasks        */
        81     #define  OS_TASK_STAT_ID          65534u
        82     
        83     #define  OS_EVENT_EN       (((OS_Q_EN > 0) && (OS_MAX_QS > 0)) || (OS_MBOX_EN > 0) || (OS_SEM_EN > 0) || (OS_MUTEX_EN > 0))
        84     
        85     /*$PAGE*/ 
        86     /*
        87     *********************************************************************************************************
        88     *                              TASK STATUS (Bit definition for OSTCBStat)
        89     *********************************************************************************************************
        90     */
        91     #define  OS_STAT_RDY               0x00u    /* Ready to run                                            */
        92     #define  OS_STAT_SEM               0x01u    /* Pending on semaphore                                    */
        93     #define  OS_STAT_MBOX              0x02u    /* Pending on mailbox                                      */
        94     #define  OS_STAT_Q                 0x04u    /* Pending on queue                                        */
        95     #define  OS_STAT_SUSPEND           0x08u    /* Task is suspended                                       */
        96     #define  OS_STAT_MUTEX             0x10u    /* Pending on mutual exclusion semaphore                   */
        97     #define  OS_STAT_FLAG              0x20u    /* Pending on event flag group                             */
        98     
        99     #define  OS_STAT_PEND_ANY         (OS_STAT_SEM | OS_STAT_MBOX | OS_STAT_Q | OS_STAT_MUTEX | OS_STAT_FLAG)
       100     
       101     /*
       102     *********************************************************************************************************
       103     *                                        OS_EVENT types
       104     *********************************************************************************************************
       105     */
       106     #define  OS_EVENT_TYPE_UNUSED         0u
       107     #define  OS_EVENT_TYPE_MBOX           1u
       108     #define  OS_EVENT_TYPE_Q              2u
       109     #define  OS_EVENT_TYPE_SEM            3u
       110     #define  OS_EVENT_TYPE_MUTEX          4u
       111     #define  OS_EVENT_TYPE_FLAG           5u
       112     
       113     /*
       114     *********************************************************************************************************
       115     *                                         EVENT FLAGS
       116     *********************************************************************************************************
       117     */
       118     #define  OS_FLAG_WAIT_CLR_ALL         0u    /* Wait for ALL    the bits specified to be CLR (i.e. 0)   */
       119     #define  OS_FLAG_WAIT_CLR_AND         0u
       120     
       121     #define  OS_FLAG_WAIT_CLR_ANY         1u    /* Wait for ANY of the bits specified to be CLR (i.e. 0)   */
       122     #define  OS_FLAG_WAIT_CLR_OR          1u
       123     
       124     #define  OS_FLAG_WAIT_SET_ALL         2u    /* Wait for ALL    the bits specified to be SET (i.e. 1)   */
       125     #define  OS_FLAG_WAIT_SET_AND         2u
       126     
       127     #define  OS_FLAG_WAIT_SET_ANY         3u    /* Wait for ANY of the bits specified to be SET (i.e. 1)   */
       128     #define  OS_FLAG_WAIT_SET_OR          3u
       129     
       130     
       131     #define  OS_FLAG_CONSUME           0x80u    /* Consume the flags if condition(s) satisfied             */
       132     
       133     
       134     #define  OS_FLAG_CLR                  0u
       135     #define  OS_FLAG_SET                  1u
       136     
       137     /*
       138     *********************************************************************************************************
       139     *                                   Values for OSTickStepState
       140     *
       141     * Note(s): This feature is used by uC/OS-View.
       142     *********************************************************************************************************
       143     */
       144     
       145  E  #if 0 > 0
       146 X   #define  OS_TICK_STEP_DIS             0u    /* Stepping is disabled, tick runs as mormal               */
       147 X   #define  OS_TICK_STEP_WAIT            1u    /* Waiting for uC/OS-View to set OSTickStepState to _ONCE  */
       148 X   #define  OS_TICK_STEP_ONCE            2u    /* Process tick once and wait for next cmd from uC/OS-View */
       149     #endif
       150     
       151     /*
       152     *********************************************************************************************************
       153     *       Possible values for 'opt' argument of OSSemDel(), OSMboxDel(), OSQDel() and OSMutexDel()
       154     *********************************************************************************************************
       155     */
       156     #define  OS_DEL_NO_PEND               0u
       157     #define  OS_DEL_ALWAYS                1u
       158     
       159     /*
       160     *********************************************************************************************************
       161     *                                     OS???PostOpt() OPTIONS
       162     *
       163     * These #defines are used to establish the options for OSMboxPostOpt() and OSQPostOpt().
       164     *********************************************************************************************************
       165     */
       166     #define  OS_POST_OPT_NONE          0x00u    /* NO option selected                                      */
       167     #define  OS_POST_OPT_BROADCAST     0x01u    /* Broadcast message to ALL tasks waiting                  */
       168     #define  OS_POST_OPT_FRONT         0x02u    /* Post to highest priority task waiting                   */
       169     
       170     /*
       171     *********************************************************************************************************

⌨️ 快捷键说明

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