📄 os_cpu_c.lst
字号:
C51 COMPILER V7.06 OS_CPU_C 04/04/2006 15:07:23 PAGE 1
C51 COMPILER V7.06, COMPILATION OF MODULE OS_CPU_C
OBJECT MODULE PLACED IN .\DEBUG\OS_CPU_C.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE Port\OS_CPU_C.C LARGE BROWSE INCDIR(F:\test\SOURCE;F:\test;F:\test\Port) DE
-BUG OBJECTEXTEND PRINT(.\LST\OS_CPU_C.lst) OBJECT(.\DEBUG\OS_CPU_C.obj)
stmt level source
1 /*
2 *********************************************************************************************************
3 * uC/OS-II
4 * The Real-Time Kernel
5 *
6 * (c) Copyright 1992-2002, Jean J. Labrosse, Weston, FL
7 * All Rights Reserved
8 *
9 *
10 * at89c55wd Specific code
11 * LARGE MEMORY MODEL
12 *
13 * keil C/C++ V7.2
14 *
15 * File : OS_CPU_C.C
16 * By : Jean J. Labrosse
17 * Port by : NiuYi(牛毅)
18 * 修补 : 2005-05-02-01:30 (增加了中断管理)
19 *********************************************************************************************************
20 */
21
22 #define OS_CPU_GLOBALS
23 #include "includes.h"
24
25 /*
26 *********************************************************************************************************
27 * OS INITIALIZATION HOOK
28 * (BEGINNING)
29 *
30 * Description: This function is called by OSInit() at the beginning of OSInit().
31 *
32 * Arguments : none
33 *
34 * Note(s) : 1) Interrupts should be disabled during this call.
35 *********************************************************************************************************
36 */
37 #if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
38 void OSInitHookBegin (void) LG_REENTRANT
39 {
40 1 }
41 #endif
42
43 /*
44 *********************************************************************************************************
45 * OS INITIALIZATION HOOK
46 * (END)
47 *
48 * Description: This function is called by OSInit() at the end of OSInit().
49 *
50 * Arguments : none
51 *
52 * Note(s) : 1) Interrupts should be disabled during this call.
53 *********************************************************************************************************
54 */
C51 COMPILER V7.06 OS_CPU_C 04/04/2006 15:07:23 PAGE 2
55 #if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
56 void OSInitHookEnd (void) LG_REENTRANT
57 {
58 1 }
59 #endif
60
61 /*$PAGE*/
62 /*
63 *********************************************************************************************************
64 * TASK CREATION HOOK
65 *
66 * Description: This function is called when a task is created.
67 *
68 * Arguments : ptcb is a pointer to the task control block of the task being created.
69 *
70 * Note(s) : 1) Interrupts are disabled during this call.
71 *********************************************************************************************************
72 */
73 #if OS_CPU_HOOKS_EN > 0
74 void OSTaskCreateHook (OS_TCB *ptcb) LG_REENTRANT
75 {
76 1 ptcb = ptcb; /* Prevent compiler warning */
77 1 }
78 #endif
79
80
81 /*
82 *********************************************************************************************************
83 * TASK DELETION HOOK
84 *
85 * Description: This function is called when a task is deleted.
86 *
87 * Arguments : ptcb is a pointer to the task control block of the task being deleted.
88 *
89 * Note(s) : 1) Interrupts are disabled during this call.
90 *********************************************************************************************************
91 */
92 #if OS_CPU_HOOKS_EN > 0
93 void OSTaskDelHook (OS_TCB *ptcb) LG_REENTRANT
94 {
95 1 ptcb = ptcb; /* Prevent compiler warning */
96 1 }
97 #endif
98
99 /*
100 *********************************************************************************************************
101 * IDLE TASK HOOK
102 *
103 * Description: This function is called by the idle task. This hook has been added to allow you to do
104 * such things as STOP the CPU to conserve power.
105 *
106 * Arguments : none
107 *
108 * Note(s) : 1) Interrupts are enabled during this call.
109 *********************************************************************************************************
110 */
111 #if OS_CPU_HOOKS_EN > 0 && OS_VERSION >= 251
112 void OSTaskIdleHook (void) LG_REENTRANT
113 {
114 1 // SBUF='i';
115 1 // while(TI==0);TI=0;
116 1 //printf ("idle task");
C51 COMPILER V7.06 OS_CPU_C 04/04/2006 15:07:23 PAGE 3
117 1 }
118 #endif
119
120 /*
121 *********************************************************************************************************
122 * STATISTIC TASK HOOK
123 *
124 * Description: This function is called every second by uC/OS-II's statistics task. This allows your
125 * application to add functionality to the statistics task.
126 *
127 * Arguments : none
128 *********************************************************************************************************
129 */
130
131 #if OS_CPU_HOOKS_EN > 0
132 void OSTaskStatHook (void) LG_REENTRANT
133 {
134 1 }
135 #endif
136
137 /*$PAGE*/
138 /*
139 *********************************************************************************************************
140 * INITIALIZE A TASK'S STACK
141 *
142 * Description: This function is called by either OSTaskCreate() or OSTaskCreateExt() to initialize the
143 * stack frame of the task being created. This function is highly processor specific.
144 *
145 * Arguments : task is a pointer to the task code
146 *
147 * os_pdata is a pointer to a user supplied data area that will be passed to the task
148 * when the task first executes.
149 *
150 * ptos is a pointer to the top of stack. It is assumed that 'ptos' points to
151 * a 'free' entry on the task stack. If OS_STK_GROWTH is set to 1 then
152 * 'ptos' will contain the HIGHEST valid address of the stack. Similarly, if
153 * OS_STK_GROWTH is set to 0, the 'ptos' will contains the LOWEST valid address
154 * of the stack.
155 *
156 * opt specifies options that can be used to alter the behavior of OSTaskStkInit().
157 * (see uCOS_II.H for OS_TASK_OPT_???).
158 *
159 * Returns : Always returns the location of the new top-of-stack' once the processor registers have
160 * been placed on the stack in the proper order.
161 *
162 * Note(s) : Interrupts are enabled when your task starts executing. You can change this by setting the
163 * PSW to 0x0002 instead. In this case, interrupts would be disabled upon task startup. The
164 * application code would be responsible for enabling interrupts at the beginning of the task
165 * code. You will need to modify OSTaskIdle() and OSTaskStat() so that they enable
166 * interrupts. Failure to do this will make your system crash!
167 *********************************************************************************************************
168 */
169 /*
170 at89c55wd PDL(sp form LOW to HIGH): (堆栈指针所指的栈顶数据为有效数据)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -