📄 os_cpu_c.lst
字号:
165 * 描述 : 这个函数每秒钟被uC/OS-II统计任务调用。这么做使你的应用程序可以增加统计任务的功能。
166 *
167 * 注意 : 无
168 *********************************************************************************************************
169 */
170
171 /*
172 void OSTaskStatHook (void) reentrant
173 {
174 }
175
176 */
177
178
C51 COMPILER V8.08 OS_CPU_C 03/02/2009 10:42:35 PAGE 4
179 /*
180 *********************************************************************************************************
181 * OS INITIALIZATION HOOK
182 * (BEGINNING)
183 *
184 * Description: This function is called by OSInit() at the beginning of OSInit().
185 *
186 * Arguments : none
187 *
188 * Note(s) : 1) Interrupts should be disabled during this call.
189 *********************************************************************************************************
190 */
191 #if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
192 void OSInitHookBegin (void)
193 {
194 1 }
195 #endif
196
197 /*
198 *********************************************************************************************************
199 * OS INITIALIZATION HOOK
200 * (END)
201 *
202 * Description: This function is called by OSInit() at the end of OSInit().
203 *
204 * Arguments : none
205 *
206 * Note(s) : 1) Interrupts should be disabled during this call.
207 *********************************************************************************************************
208 */
209 #if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
210 void OSInitHookEnd (void)
211 {
212 1 }
213 #endif
214
215
216 /*
217 *********************************************************************************************************
218 * IDLE TASK HOOK
219 *
220 * Description: This function is called by the idle task. This hook has been added to allow you to do
221 * such things as STOP the CPU to conserve power.
222 *
223 * Arguments : none
224 *
225 * Note(s) : 1) Interrupts are enabled during this call.
226 *********************************************************************************************************
227 */
228 #if OS_CPU_HOOKS_EN > 0 && OS_VERSION >= 251
229 void OSTaskIdleHook (void)reentrant
230 {
231 1 }
232 #endif
233
234 /*
235 *********************************************************************************************************
236 * OSTCBInit() HOOK
237 *
238 * Description: This function is called by OS_TCBInit() after setting up most of the TCB.
239 *
240 * Arguments : ptcb is a pointer to the TCB of the task being created.
C51 COMPILER V8.08 OS_CPU_C 03/02/2009 10:42:35 PAGE 5
241 *
242 * Note(s) : 1) Interrupts may or may not be ENABLED during this call.
243 *********************************************************************************************************
244 */
245 #if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
246 void OSTCBInitHook (OS_TCB *ptcb) reentrant
247 {
248 1 ptcb = ptcb; /* Prevent Compiler warning */
249 1 }
250 #endif
251
252
253
254 void serial(void) reentrant
255 {
256 1
257 1
258 1
259 1 }
260
261
262
263
264
265
266 /*
267 *********************************************************************************************************
268 * 定时钩挂函数
269 *
270 * 描述 : 本函数每一滴答被调用一次。
271 *
272 * 参数 : 无
273 *
274 * 注意 : 1) 在本调用期间中断可以或不可以使能。
275 *********************************************************************************************************
276 */
277
278
279 void OSTimeTickHook (void) reentrant
280 {
281 1
282 1
283 1
284 1
285 1 }
286
287 #endif
288
289
290
291
292
293
294 /*
295 *******************************************************************************
296 * 初始化定时器0
297 *
298 * 说明:本函数在系统初始化时被调用一次
299 *
300 * 参数:无
301 *
302 *******************************************************************************
C51 COMPILER V8.08 OS_CPU_C 03/02/2009 10:42:35 PAGE 6
303 */
304 void InitTimer0(void) reentrant
305 {
306 1
307 1 SFRPAGE = 0;
308 1
309 1 TMOD=TMOD&0xF0;
310 1 TMOD=TMOD|0x01;
311 1
312 1 CKCON |=0x02; //系统时钟/48
313 1
314 1 TH0=0xEE; //100次/秒
315 1 TL0=0x00;
316 1
317 1 TR0=1;
318 1
319 1 }
320
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 736 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -