📄 serial.lst
字号:
97 =2
98 =2 #define OS_ISR_PROTO_EXT 1
99 =2 void OSCtxSw(void);
100 =2
101 =2 void InitHardware(void) reentrant; //初始化硬件时钟中断等,系统初始化工作
102 =2
103 =2 #endif //_OS_CPU_H
31 =1 #include "uCosii\os_cfg.h"
1 =2 /*
2 =2 *********************************************************************************************************
3 =2 * uC/OS-II
4 =2 * The Real-Time Kernel
5 =2 *
6 =2 * (c) Copyright 1992-2001, Jean J. Labrosse, Weston, FL
7 =2 * All Rights Reserved
8 =2 *
9 =2 * uC/OS-II Configuration File for V2.51
10 =2 *
11 =2 * File : OS_CFG.H
12 =2 * By : Jean J. Labrosse
13 =2 *********************************************************************************************************
14 =2 */
15 =2
16 =2 /*
17 =2 *********************************************************************************************************
18 =2 * uC/OS-II CONFIGURATION
19 =2 *********************************************************************************************************
20 =2 */
21 =2 #ifndef __OS_CFG_H
22 =2 #define __OS_CFG_H
23 =2
24 =2 #define MaxStkSize 100 /*根据杨屹的修改,每个任务使用同样大小的堆栈,这就是每个堆栈的大小*
-/
25 =2
26 =2 #define OS_MAX_EVENTS 2 /* Max. number of event control blocks in your application ... */
27 =2 /* ... MUST be > 0 */
28 =2 #define OS_MAX_FLAGS 5 /* Max. number of Event Flag Groups in your application ... */
29 =2 /* ... MUST be > 0 */
30 =2 #define OS_MAX_MEM_PART 5 /* Max. number of memory partitions ... */
31 =2 /* ... MUST be > 0 */
32 =2 #define OS_MAX_QS 2 /* Max. number of queue control blocks in your application ... */
33 =2 /* ... MUST be > 0 */
34 =2 #define OS_MAX_TASKS 11 /* Max. number of tasks in your application ... */
35 =2 /* ... MUST be >= 2 */
36 =2
37 =2 #define OS_LOWEST_PRIO 12 /* Defines the lowest priority that can be assigned ... */
38 =2 /* ... MUST NEVER be higher than 63! */
39 =2
40 =2 #define OS_TASK_IDLE_STK_SIZE MaxStkSize /* Idle task stack size (# of OS_STK wide entries),使用相同
-的栈大小*/
41 =2
42 =2 #define OS_TASK_STAT_EN 0 /* Enable (1) or Disable(0) the statistics task */
43 =2 #define OS_TASK_STAT_STK_SIZE MaxStkSize /* Statistics task stack size (# of OS_STK wide entries),使
-用相同的栈大小*/
44 =2
45 =2 #define OS_ARG_CHK_EN 1 /* Enable (1) or Disable (0) argument checking */
46 =2 #define OS_CPU_HOOKS_EN 1 /* uC/OS-II hooks are found in the processor port files */
47 =2
48 =2
49 =2 /* ----------------------- EVENT FLAGS ------------------------ */
50 =2 #define OS_FLAG_EN 0 /* Enable (1) or Disable (0) code generation for EVENT FLAGS */
51 =2 #define OS_FLAG_WAIT_CLR_EN 0 /* Include code for Wait on Clear EVENT FLAGS */
C51 COMPILER V8.08 SERIAL 08/06/2008 16:11:38 PAGE 9
52 =2 #define OS_FLAG_ACCEPT_EN 0 /* Include code for OSFlagAccept() */
53 =2 #define OS_FLAG_DEL_EN 0 /* Include code for OSFlagDel() */
54 =2 #define OS_FLAG_QUERY_EN 0 /* Include code for OSFlagQuery() */
55 =2
56 =2
57 =2 /* -------------------- MESSAGE MAILBOXES --------------------- */
58 =2 #define OS_MBOX_EN 0 /* Enable (1) or Disable (0) code generation for MAILBOXES */
59 =2 #define OS_MBOX_ACCEPT_EN 0 /* Include code for OSMboxAccept() */
60 =2 #define OS_MBOX_DEL_EN 0 /* Include code for OSMboxDel() */
61 =2 #define OS_MBOX_POST_EN 0 /* Include code for OSMboxPost() */
62 =2 #define OS_MBOX_POST_OPT_EN 0 /* Include code for OSMboxPostOpt() */
63 =2 #define OS_MBOX_QUERY_EN 0 /* Include code for OSMboxQuery() */
64 =2
65 =2
66 =2 /* --------------------- MEMORY MANAGEMENT -------------------- */
67 =2 #define OS_MEM_EN 0 /* Enable (1) or Disable (0) code generation for MEMORY MANAGER */
68 =2 #define OS_MEM_QUERY_EN 0 /* Include code for OSMemQuery() */
69 =2
70 =2
71 =2 /* ---------------- MUTUAL EXCLUSION SEMAPHORES --------------- */
72 =2 #define OS_MUTEX_EN 0 /* Enable (1) or Disable (0) code generation for MUTEX */
73 =2 #define OS_MUTEX_ACCEPT_EN 0 /* Include code for OSMutexAccept() */
74 =2 #define OS_MUTEX_DEL_EN 0 /* Include code for OSMutexDel() */
75 =2 #define OS_MUTEX_QUERY_EN 0 /* Include code for OSMutexQuery() */
76 =2
77 =2
78 =2 /* ---------------------- MESSAGE QUEUES ---------------------- */
79 =2 #define OS_Q_EN 0 /* Enable (1) or Disable (0) code generation for QUEUES */
80 =2 #define OS_Q_ACCEPT_EN 0 /* Include code for OSQAccept() */
81 =2 #define OS_Q_DEL_EN 0 /* Include code for OSQDel() */
82 =2 #define OS_Q_FLUSH_EN 0 /* Include code for OSQFlush() */
83 =2 #define OS_Q_POST_EN 0 /* Include code for OSQPost() */
84 =2 #define OS_Q_POST_FRONT_EN 0 /* Include code for OSQPostFront() */
85 =2 #define OS_Q_POST_OPT_EN 0 /* Include code for OSQPostOpt() */
86 =2 #define OS_Q_QUERY_EN 0 /* Include code for OSQQuery() */
87 =2
88 =2
89 =2 /* ------------------------ SEMAPHORES ------------------------ */
90 =2 #define OS_SEM_EN 0 /* Enable (1) or Disable (0) code generation for SEMAPHORES */
91 =2 #define OS_SEM_ACCEPT_EN 0 /* Include code for OSSemAccept() */
92 =2 #define OS_SEM_DEL_EN 0 /* Include code for OSSemDel() */
93 =2 #define OS_SEM_QUERY_EN 0 /* Include code for OSSemQuery() */
94 =2
95 =2
96 =2 /* --------------------- TASK MANAGEMENT ---------------------- */
97 =2 #define OS_TASK_CHANGE_PRIO_EN 0 /* Include code for OSTaskChangePrio() */
98 =2 #define OS_TASK_CREATE_EN 1 /* Include code for OSTaskCreate() */
99 =2 #define OS_TASK_CREATE_EXT_EN 0 /* Include code for OSTaskCreateExt() */
100 =2 #define OS_TASK_DEL_EN 0 /* Include code for OSTaskDel() */
101 =2 #define OS_TASK_SUSPEND_EN 0 /* Include code for OSTaskSuspend() and OSTaskResume() */
102 =2 #define OS_TASK_QUERY_EN 0 /* Include code for OSTaskQuery() */
103 =2
104 =2
105 =2 /* --------------------- TIME MANAGEMENT ---------------------- */
106 =2 #define OS_TIME_DLY_HMSM_EN 1 /* Include code for OSTimeDlyHMSM() */
107 =2 #define OS_TIME_DLY_RESUME_EN 0 /* Include code for OSTimeDlyResume() */
108 =2 #define OS_TIME_GET_SET_EN 1 /* Include code for OSTimeGet() and OSTimeSet() */
109 =2
110 =2
111 =2 /* ---------------------- MISCELLANEOUS ----------------------- */
112 =2 #define OS_SCHED_LOCK_EN 0 /* Include code for OSSchedLock() and OSSchedUnlock() */
113 =2
C51 COMPILER V8.08 SERIAL 08/06/2008 16:11:38 PAGE 10
114 =2
115 =2 #define OS_TICKS_PER_SEC 50 /* Set the number of ticks in one second */
116 =2
117 =2
118 =2 typedef INT8U OS_FLAGS; /* Date type for event flag bits (8, 16 or 32 bits) */
119 =2
120 =2 #endif
32 =1 #include "uCosii\ucos_ii.h"
1 =2 /*
2 =2 *********************************************************************************************************
3 =2 * uC/OS-II
4 =2 * The Real-Time Kernel
5 =2 *
6 =2 * (c) Copyright 1992-2001, Jean J. Labrosse, Weston, FL
7 =2 * All Rights Reserved
8 =2 *
9 =2 * File : uCOS_II.H
10 =2 * By : Jean J. Labrosse
11 =2 *********************************************************************************************************
12 =2 */
13 =2
14 =2 /*
15 =2 *********************************************************************************************************
16 =2 * MISCELLANEOUS
17 =2 *********************************************************************************************************
18 =2 */
19 =2
20 =2 #define OS_VERSION 251 /* Version of uC/OS-II (Vx.yy mult. by 100) */
21 =2
22 =2 #ifdef OS_GLOBALS
=2 #define OS_EXT
=2 #else
25 =2 #define OS_EXT extern
26 =2 #endif
27 =2
28 =2 #ifndef FALSE
29 =2 #define FALSE 0
30 =2 #endif
31 =2
32 =2 #ifndef TRUE
33 =2 #define TRUE 1
34 =2 #endif
35 =2
36 =2 #define OS_PRIO_SELF 0xFF /* Indicate SELF priority */
37 =2
38 =2 #if OS_TASK_STAT_EN > 0
=2 #define OS_N_SYS_TASKS 2 /* Number of system tasks */
=2 #else
41 =2 #define OS_N_SYS_TASKS 1
42 =2 #endif
43 =2
44 =2 #define OS_STAT_PRIO (OS_LOWEST_PRIO - 1) /* Statistic task priority */
45 =2 #define OS_IDLE_PRIO (OS_LOWEST_PRIO) /* IDLE task priority */
46 =2
47 =2 #define OS_EVENT_TBL_SIZE ((OS_LOWEST_PRIO) / 8 + 1) /* Size of event table */
48 =2 #define OS_RDY_TBL_SIZE ((OS_LOWEST_PRIO) / 8 + 1) /* Size of ready table */
49 =2
50 =2 #define OS_TASK_IDLE_ID 65535 /* I.D. numbers for Idle and Stat tasks */
51 =2 #define OS_TASK_STAT_ID 65534
52 =2
53 =2 #define OS_EVENT_EN (((OS_Q_EN > 0) && (OS_MAX_QS > 0)) || (OS_MBOX_EN > 0) || (OS_SEM_EN > 0) || (
-OS_MUTEX_EN > 0))
C51 COMPILER V8.08 SERIAL 08/06/2008 16:11:38 PAGE 11
54 =2
55 =2 /*
56 =2 *********************************************************************************************************
57 =2 * TASK STATUS (Bit definition for OSTCBStat)
58 =2 *********************************************************************************************************
59 =2 */
60 =2 #define OS_STAT_RDY 0x00 /* Ready to run */
61 =2 #define OS_STAT_SEM 0x01 /* Pending on semaphore */
62 =2 #define OS_STAT_MBOX 0x02 /* Pending on mailbox */
63 =2 #define OS_STAT_Q 0x04 /* Pending on queue */
64 =2 #define OS_STAT_SUSPEND 0x08 /* Task is suspended */
65 =2 #define OS_STAT_MUTEX 0x10 /* Pending on mutual exclusion semaphore */
66 =2 #define OS_STAT_FLAG 0x20 /* Pending on event flag group */
67 =2
68 =2 /*
69 =2 *********************************************************************************************************
70 =2 * OS_EVENT types
71 =2 *********************************************************************************************************
72 =2 */
73 =2 #define OS_EVENT_TYPE_UNUSED 0
74 =2 #define OS_EVENT_TYPE_MBOX 1
75 =2 #define OS_EVENT_TYPE_Q 2
76 =2 #define OS_EVENT_TYPE_SEM 3
77 =2 #define OS_EVENT_TYPE_MUTEX 4
78 =2 #define OS_EVENT_TYPE_FLAG 5
79 =2
80 =2 /*
81 =2 *********************************************************************************************************
82 =2 * EVENT FLAGS
83 =2 *********************************************************************************************************
84 =2 */
85 =2 #define OS_FLAG_WAIT_CLR_ALL 0 /* Wait for ALL the bits specified to be CLR (i.e. 0) */
86 =2 #define OS_FLAG_WAIT_CLR_AND 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -