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

📄 yy1.lst

📁 UCOSII移植到430芯片中使用
💻 LST
📖 第 1 页 / 共 5 页
字号:
  62      =2  
  63      =2  
  64      =2  #ifndef  FALSE
  65      =2  #define  FALSE                     0
  66      =2  #endif
  67      =2  
  68      =2  #ifndef  TRUE
  69      =2  #define  TRUE                      1
  70      =2  #endif
  71      =2  
  72      =2  /*
C51 COMPILER V7.01  YY1                                                                    01/09/2003 18:37:29 PAGE 5   

  73      =2  *********************************************************************************************************
  74      =2  *                                              ERROR CODES
  75      =2  *********************************************************************************************************
  76      =2  */
  77      =2  
  78      =2  #define OS_NO_ERR                 0
  79      =2  #define OS_ERR_EVENT_TYPE         1
  80      =2  #define OS_ERR_PEND_ISR           2
  81      =2  
  82      =2  #define OS_TIMEOUT               10
  83      =2  #define OS_TASK_NOT_EXIST        11
  84      =2  
  85      =2  #define OS_MBOX_FULL             20
  86      =2  
  87      =2  #define OS_Q_FULL                30
  88      =2  
  89      =2  #define OS_PRIO_EXIST            40
  90      =2  #define OS_PRIO_ERR              41
  91      =2  #define OS_PRIO_INVALID          42
  92      =2  
  93      =2  #define OS_SEM_OVF               50
  94      =2  
  95      =2  #define OS_TASK_DEL_ERR          60
  96      =2  #define OS_TASK_DEL_IDLE         61
  97      =2  #define OS_TASK_DEL_REQ          62
  98      =2  #define OS_TASK_DEL_ISR          63
  99      =2  
 100      =2  #define OS_NO_MORE_TCB           70
 101      =2  
 102      =2  #define OS_TIME_NOT_DLY          80
 103      =2  #define OS_TIME_INVALID_MINUTES  81
 104      =2  #define OS_TIME_INVALID_SECONDS  82
 105      =2  #define OS_TIME_INVALID_MILLI    83
 106      =2  #define OS_TIME_ZERO_DLY         84
 107      =2  
 108      =2  #define OS_TASK_SUSPEND_PRIO     90
 109      =2  #define OS_TASK_SUSPEND_IDLE     91
 110      =2  
 111      =2  #define OS_TASK_RESUME_PRIO     100
 112      =2  #define OS_TASK_NOT_SUSPENDED   101
 113      =2  
 114      =2  #define OS_MEM_INVALID_PART     110
 115      =2  #define OS_MEM_INVALID_BLKS     111
 116      =2  #define OS_MEM_INVALID_SIZE     112
 117      =2  #define OS_MEM_NO_FREE_BLKS     113
 118      =2  #define OS_MEM_FULL             114
 119      =2  
 120      =2  #define OS_TASK_OPT_ERR         130
 121      =2  
 122      =2  /*$PAGE*/
 123      =2  /*
 124      =2  *********************************************************************************************************
 125      =2  *                                          EVENT CONTROL BLOCK
 126      =2  *********************************************************************************************************
 127      =2  */
 128      =2  
 129      =2  #if (OS_MAX_EVENTS >= 2)
 130      =2  typedef struct {
 131      =2      void   *OSEventPtr;                    /* Pointer to message or queue structure                    */
 132      =2      INT8U   OSEventTbl[OS_EVENT_TBL_SIZE]; /* List of tasks waiting for event to occur                 */
 133      =2      INT16U  OSEventCnt;                    /* Count of used when event is a semaphore                  */
 134      =2      INT8U   OSEventType;                   /* OS_EVENT_TYPE_MBOX, OS_EVENT_TYPE_Q or OS_EVENT_TYPE_SEM */
C51 COMPILER V7.01  YY1                                                                    01/09/2003 18:37:29 PAGE 6   

 135      =2      INT8U   OSEventGrp;                    /* Group corresponding to tasks waiting for event to occur  */
 136      =2  } OS_EVENT;
 137      =2  #endif
 138      =2  
 139      =2  /*$PAGE*/
 140      =2  /*
 141      =2  *********************************************************************************************************
 142      =2  *                                          MESSAGE MAILBOX DATA
 143      =2  *********************************************************************************************************
 144      =2  */
 145      =2  
 146      =2  #if OS_MBOX_EN
           =2 typedef struct {
           =2     void   *OSMsg;                         /* Pointer to message in mailbox                            */
           =2     INT8U   OSEventTbl[OS_EVENT_TBL_SIZE]; /* List of tasks waiting for event to occur                 */
           =2     INT8U   OSEventGrp;                    /* Group corresponding to tasks waiting for event to occur  */
           =2 } OS_MBOX_DATA;
           =2 #endif
 153      =2  
 154      =2  /*
 155      =2  *********************************************************************************************************
 156      =2  *                                     MEMORY PARTITION DATA STRUCTURES
 157      =2  *********************************************************************************************************
 158      =2  */
 159      =2  
 160      =2  #if OS_MEM_EN && (OS_MAX_MEM_PART >= 2)
           =2 typedef struct {                       /* MEMORY CONTROL BLOCK                                         */
           =2     void   *OSMemAddr;                 /* Pointer to beginning of memory partition                     */
           =2     void   *OSMemFreeList;             /* Pointer to list of free memory blocks                        */
           =2     INT32U  OSMemBlkSize;              /* Size (in bytes) of each block of memory                      */
           =2     INT32U  OSMemNBlks;                /* Total number of blocks in this partition                     */
           =2     INT32U  OSMemNFree;                /* Number of memory blocks remaining in this partition          */
           =2 } OS_MEM;
           =2 
           =2 
           =2 typedef struct {
           =2     void   *OSAddr;                    /* Pointer to the beginning address of the memory partition     */
           =2     void   *OSFreeList;                /* Pointer to the beginning of the free list of memory blocks   */
           =2     INT32U  OSBlkSize;                 /* Size (in bytes) of each memory block                         */
           =2     INT32U  OSNBlks;                   /* Total number of blocks in the partition                      */
           =2     INT32U  OSNFree;                   /* Number of memory blocks free                                 */
           =2     INT32U  OSNUsed;                   /* Number of memory blocks used                                 */
           =2 } OS_MEM_DATA;
           =2 #endif
 179      =2  
 180      =2  /*$PAGE*/
 181      =2  /*
 182      =2  *********************************************************************************************************
 183      =2  *                                          MESSAGE QUEUE DATA
 184      =2  *********************************************************************************************************
 185      =2  */
 186      =2  
 187      =2  #if OS_Q_EN
           =2 typedef struct {
           =2     void   *OSMsg;                          /* Pointer to next message to be extracted from queue      */
           =2     INT16U  OSNMsgs;                        /* Number of messages in message queue                     */
           =2     INT16U  OSQSize;                        /* Size of message queue                                   */
           =2     INT8U   OSEventTbl[OS_EVENT_TBL_SIZE];  /* List of tasks waiting for event to occur                */
           =2     INT8U   OSEventGrp;                     /* Group corresponding to tasks waiting for event to occur */
           =2 } OS_Q_DATA;
           =2 #endif
 196      =2  
C51 COMPILER V7.01  YY1                                                                    01/09/2003 18:37:29 PAGE 7   

 197      =2  /*
 198      =2  *********************************************************************************************************
 199      =2  *                                           SEMAPHORE DATA
 200      =2  *********************************************************************************************************
 201      =2  */
 202      =2  
 203      =2  #if OS_SEM_EN
 204      =2  typedef struct {
 205      =2      INT16U  OSCnt;                          /* Semaphore count                                         */
 206      =2      INT8U   OSEventTbl[OS_EVENT_TBL_SIZE];  /* List of tasks waiting for event to occur                */
 207      =2      INT8U   OSEventGrp;                     /* Group corresponding to tasks waiting for event to occur */
 208      =2  } OS_SEM_DATA;
 209      =2  #endif
 210      =2  
 211      =2  /*
 212      =2  *********************************************************************************************************
 213      =2  *                                            TASK STACK DATA
 214      =2  *********************************************************************************************************
 215      =2  */
 216      =2  
 217      =2  #if OS_TASK_CREATE_EXT_EN
           =2 typedef struct {
           =2     INT32U  OSFree;                    /* Number of free bytes on the stack                            */
           =2     INT32U  OSUsed;                    /* Number of bytes used on the stack                            */
           =2 } OS_STK_DATA;
           =2 #endif
 223      =2  
 224      =2  /*$PAGE*/
 225      =2  /*
 226      =2  *********************************************************************************************************
 227      =2  *                                          TASK CONTROL BLOCK
 228      =2  *********************************************************************************************************
 229      =2  */
 230      =2  
 231      =2  typedef struct os_tcb {
 232      =2      OS_STK        *OSTCBStkPtr;        /* Pointer to current top of stack                              */
 233      =2  
 234      =2  #if OS_TASK_CREATE_EXT_EN    
           =2     void          *OSTCBExtPtr;        /* Pointer to user definable data for TCB extension             */
           =2     OS_STK        *OSTCBStkBottom;     /* Pointer to bottom of stack                                   */
           =2     INT32U         OSTCBStkSize;       /* Size of task stack (in bytes)                                */
           =2     INT16U         OSTCBOpt;           /* Task options as passed by OSTaskCreateExt()                  */
           =2     INT16U         OSTCBId;            /* Task ID (0..65535)                                           */
           =2 #endif
 241      =2  
 242      =2      struct os_tcb *OSTCBNext;          /* Pointer to next     TCB in the TCB list                      */
 243      =2      struct os_tcb *OSTCBPrev;          /* Pointer to previous TCB in the TCB list                      */
 244      =2  
 245      =2  #if (OS_Q_EN && (OS_MAX_QS >= 2)) || OS_MBOX_EN || OS_SEM_EN
 246      =2      OS_EVENT      *OSTCBEventPtr;      /* Pointer to event control block                               */
 247      =2  #endif
 248      =2  
 249      =2  #if (OS_Q_EN && (OS_MAX_QS >= 2)) || OS_MBOX_EN
           =2     void          *OSTCBMsg;           /* Message received from OSMboxPost() or OSQPost()              */
           =2 #endif    
 252      =2  
 253      =2      INT16U         OSTCBDly;           /* Nbr ticks to delay task or, timeout waiting for event        */
 254      =2      INT8U          OSTCBStat;          /* Task status                                                  */
 255      =2      INT8U          OSTCBPrio;          /* Task priority (0 == highest, 63 == lowest)                   */
 256      =2  
 257      =2      INT8U          OSTCBX;             /* Bit position in group  corresponding to task priority (0..7) */
 258      =2      INT8U          OSTCBY;             /* Index into ready table corresponding to task priority        */
C51 COMPILER V7.01  YY1                                                                    01/09/2003 18:37:29 PAGE 8   

 259      =2      INT8U          OSTCBBitX;          /* Bit mask to access bit position in ready table               */
 260      =2      INT8U          OSTCBBitY;          /* Bit mask to access bit position in ready group               */
 261      =2      
 262      =2  #if OS_TASK_DEL_EN    
           =2     BOOLEAN        OSTCBDelReq;        /* Indicates whether a task needs to delete itself              */
           =2 #endif
 265      =2  } OS_TCB;
 266      =2  
 267      =2  /*$PAGE*/
 268      =2  /*
 269      =2  *********************************************************************************************************
 270      =2  *                                            GLOBAL VARIABLES
 271      =2  *********************************************************************************************************
 272      =2  */
 273      =2                                         
 274      =2  OS_EXT  INT32U       OSCtxSwCtr;               /* Counter of number of context switches                */
 275      =2  
 276      =2  #if     (OS_MAX_EVENTS >= 2)
 277      =2  OS_EXT  OS_EVENT    *OSEventFreeList;          /* Pointer to list of free EVENT control blocks         */
 278      =2  OS_EXT  OS_EVENT     OSEventTbl[OS_MAX_EVENTS];/* Table of EVENT control blocks                        */
 279      =2  #endif
 280      =2  
 281      =2  OS_EXT  INT32U       OSIdleCtr;                /* Idle counter                                         */
 282      =2  
 283      =2  #if     OS_TASK_STAT_EN
           =2 OS_EXT  INT8S        OSCPUUsage;               /* Percentage of CPU used                               */
           =2 OS_EXT  INT32U       OSIdleCtrMax;             /* Maximum value that idle counter can take in 1 sec.   */
           =2 OS_EXT  INT32U       OSIdleCtrRun;             /* Value reached by idle counter at run time in 1 sec.  */
           =2 OS_EXT  BOOLEAN      OSStatRdy;                /* Flag indicating that the statistic task is ready     */
           =2 #endif
 289      =2  
 290      =2  OS_EXT  INT8U        OSIntNesting;             /* Interrupt nesting level                              */
 291      =2  
 292      =2  OS_EXT  INT8U        OSLockNesting;            /* Multitasking lock nesting level                      */
 293      =2  
 294      =2  OS_EXT idata INT8U   OSPrioCur;                /* Priority of current task                             */
 295      =2  OS_EXT idata INT8U   OSPrioHighRdy;            /* Priority of highest priority task                    */
 296      =2  
 297      =2  OS_EXT  INT8U        OSRdyGrp;                        /* Ready list group                              */
 298      =2  OS_EXT  INT8U        OSRdyTbl[OS_RDY_TBL_SIZE];       /* Table of tasks which are ready to run         */

⌨️ 快捷键说明

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