📄 ucos_ii.lst
字号:
C51 COMPILER V8.02 UCOS_II 03/10/2008 11:50:50 PAGE 1
C51 COMPILER V8.02, COMPILATION OF MODULE UCOS_II
OBJECT MODULE PLACED IN Ucos_ii.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE Ucos_ii.c LARGE BROWSE DEBUG OBJECTEXTEND CODE LISTINCLUDE SYMBOLS
line level source
1 /*
2 *********************************************************************************************************
3 * uC/OS-II
4 * The Real-Time Kernel
5 *
6 * (c) Copyright 1992-1998, Jean J. Labrosse, Plantation, FL
7 * All Rights Reserved
8 *
9 * V2.00
10 *
11 * File : uCOS_II.C
12 * By : Jean J. Labrosse
13 *********************************************************************************************************
14 */
15
16 #define OS_GLOBALS /* Declare GLOBAL variables */
17 #include <includes.h>
1 =1 /*
2 =1 *********************************************************************************************************
3 =1 * uC/OS-II
4 =1 * 实时内核
5 =1 *
6 =1 * (c) Copyright 1992-1998, Jean J. Labrosse, Plantation, FL
7 =1 * 版权所有
8 =1 *
9 =1 * MCU-51 专用代码
10 =1 * KEIL C51大模式编译
11 =1 *
12 =1 * 文件名 : INCLUDES.H
13 =1 * 作者 : Jean J. Labrosse
14 =1 * 改编 : 杨屹 gdtyy@ri.gdt.com.cn 巨龙公司系统集成开发部 2002.09.27
15 =1 *********************************************************************************************************
16 =1 */
17 =1
18 =1 //uC/OS-II核心
19 =1 #include <os_cpu.h>
1 =2 /*
2 =2 *********************************************************************************************************
3 =2 * uC/OS-II
4 =2 * 实时内核
5 =2 *
6 =2 * (c) Copyright 1992-1998, Jean J. Labrosse, Plantation, FL
7 =2 * 版权所有
8 =2 *
9 =2 * MCU-51 专用代码
10 =2 * KEIL C51大模式编译
11 =2 *
12 =2 * 文件名 : OS_CPU.H
13 =2 * 作者 : Jean J. Labrosse
14 =2 * 改编 : 杨屹 gdtyy@ri.gdt.com.cn 巨龙公司系统集成开发部
15 =2 *********************************************************************************************************
16 =2 */
17 =2
18 =2 #ifdef OS_CPU_GLOBALS
=2 #define OS_CPU_EXT
C51 COMPILER V8.02 UCOS_II 03/10/2008 11:50:50 PAGE 2
=2 #else
21 =2 #define OS_CPU_EXT extern
22 =2 #endif
23 =2
24 =2 /*
25 =2 *********************************************************************************************************
26 =2 * 数据类型
27 =2 * (编译器相关)
28 =2 *********************************************************************************************************
29 =2 */
30 =2
31 =2 //详见C51.PDF第176页
32 =2 typedef unsigned char BOOLEAN; //注意:不要使用bit定义,因为在结构体里无法使用
33 =2 typedef unsigned char INT8U; //无符号8位数
34 =2 typedef signed char INT8S; //有符号8位数
35 =2 typedef unsigned int INT16U; //无符号16位数
36 =2 typedef signed int INT16S; //有符号16位数
37 =2 typedef unsigned long INT32U; //无符号32位数
38 =2 typedef signed long INT32S; //有符号32位数
39 =2 typedef float FP32; //单精度浮点数
40 =2 typedef double FP64; //双精度浮点数
41 =2
42 =2 typedef unsigned char OS_STK; //栈单元宽度为8比特
43 =2
44 =2 #define BYTE INT8S //兼容以前版本的数据类型
45 =2 #define UBYTE INT8U //uC/OS-II可以不用这些数据类型
46 =2 #define WORD INT16S
47 =2 #define UWORD INT16U
48 =2 #define LONG INT32S
49 =2 #define ULONG INT32U
50 =2
51 =2 /*
52 =2 *********************************************************************************************************
53 =2 * 处理器相关代码 MCU-51 (大模式)
54 =2 * 针对51单片机,只使用方法1(直接开关中断)
55 =2 *********************************************************************************************************
56 =2 */
57 =2
58 =2 #define OS_ENTER_CRITICAL() EA=0 //关中断,程序由外部ROM区开始运行
59 =2
60 =2 #define OS_EXIT_CRITICAL() EA=1 //开中断,程序由内部ROM区开始运行
61 =2
62 =2 #define OS_STK_GROWTH 0 //MCU-51堆栈从下往上增长 1=向下,0=向上
63 =2
64 =2 #define OS_TASK_SW() OSCtxSw() //因为MCU-51没有软中断指令,所以用程序调用代替。两者的堆栈格式相同,
65 =2 //RETI指令复位中断系统,RET则没有。实践表明,对于MCU-51,用子程序调
66 =2 //用入栈,用中断返回指令RETI出栈是没有问题的,反之中断入栈RET出栈则
67 =2 //不行。总之,对于入栈,子程序调用与中断调用效果是一样的,可以混用。
68 =2 //在没有中断发生的情况下复位中断系统也不会影响系统正常运行。
69 =2 //详见《uC/OS-II》第八章193页第12行
70 =2
20 =1 #include <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-1998, Jean J. Labrosse, Plantation, FL
7 =2 * All Rights Reserved
8 =2 *
9 =2 * Configuration for Intel 80x86 (Large)
10 =2 *
C51 COMPILER V8.02 UCOS_II 03/10/2008 11:50:50 PAGE 3
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
22 =2 #define MaxStkSize 100
23 =2
24 =2 #define OS_MAX_EVENTS 2 /* Max. number of event control blocks in your application
-... */
25 =2 /* ... MUST be >= 2
- */
26 =2 #define OS_MAX_MEM_PART 2 /* Max. number of memory partitions ...
- */
27 =2 /* ... MUST be >= 2
- */
28 =2 #define OS_MAX_QS 2 /* Max. number of queue control blocks in your application
-... */
29 =2 /* ... MUST be >= 2
- */
30 =2 #define OS_MAX_TASKS 11 /* Max. number of tasks in your application ...
- */
31 =2 /* ... MUST be >= 2
- */
32 =2
33 =2 #define OS_LOWEST_PRIO 12 /* Defines the lowest priority that can be assigned ...
- */
34 =2 /* ... MUST NEVER be higher than 63!
- */
35 =2
36 =2 #define OS_TASK_IDLE_STK_SIZE MaxStkSize /* Idle task stack size (# of 16-bit wide entries)
- */
37 =2
38 =2 #define OS_TASK_STAT_EN 0 /* Enable (1) or Disable(0) the statistics task
- */
39 =2 #define OS_TASK_STAT_STK_SIZE MaxStkSize /* Statistics task stack size (# of 16-bit wide entries)
- */
40 =2
41 =2 #define OS_CPU_HOOKS_EN 1 /* uC/OS-II hooks are found in the processor port files
- */
42 =2 #define OS_MBOX_EN 0 /* Include code for MAILBOXES
- */
43 =2 #define OS_MEM_EN 0 /* Include code for MEMORY MANAGER (fixed sized memory bloc
-ks) */
44 =2 #define OS_Q_EN 0 /* Include code for QUEUES
- */
45 =2 #define OS_SEM_EN 0 /* Include code for SEMAPHORES
- */
46 =2 #define OS_TASK_CHANGE_PRIO_EN 0 /* Include code for OSTaskChangePrio()
- */
47 =2 #define OS_TASK_CREATE_EN 1 /* Include code for OSTaskCreate()
- */
48 =2 #define OS_TASK_CREATE_EXT_EN 0 /* Include code for OSTaskCreateExt()
- */
49 =2 #define OS_TASK_DEL_EN 0 /* Include code for OSTaskDel()
- */
50 =2 #define OS_TASK_SUSPEND_EN 0 /* Include code for OSTaskSuspend() and OSTaskResume()
C51 COMPILER V8.02 UCOS_II 03/10/2008 11:50:50 PAGE 4
- */
51 =2
52 =2 #define OS_TICKS_PER_SEC 50 /* Set the number of ticks in one second
- */
53 =2
21 =1 #include <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-1998, Jean J. Labrosse, Plantation, FL
7 =2 * All Rights Reserved
8 =2 *
9 =2 * V2.00
10 =2 *
11 =2 * File : uCOS_II.H
12 =2 * By : Jean J. Labrosse
13 =2 *********************************************************************************************************
14 =2 */
15 =2
16 =2 /*
17 =2 *********************************************************************************************************
18 =2 * MISCELLANEOUS
19 =2 *********************************************************************************************************
20 =2 */
21 =2
22 =2 #define OS_VERSION 200 /* Version of uC/OS-II (Vx.yy multiplied by 100) */
23 =2
24 =2 #ifdef OS_GLOBALS
25 =2 #define OS_EXT
26 =2 #else
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -