📄 os_time.lst
字号:
##############################################################################
# #
# IAR ARM ANSI C/C++ Compiler V4.42A/W32 KICKSTART 10/Jan/2008 16:48:30 #
# Copyright 1999-2005 IAR Systems. All rights reserved. #
# #
# Cpu mode = arm #
# Endian = little #
# Stack alignment = 4 #
# Source file = D:\work\资料\嵌入式操作系统\UCOS-II\Micrium\Software #
# \uCOS-II\Source\os_time.c #
# Command line = D:\work\资料\嵌入式操作系统\UCOS-II\Micrium\Software #
# \uCOS-II\Source\os_time.c -lCN #
# D:\work\资料\嵌入式操作系统\UCOS-II\Micrium\Software #
# \EvalBoards\NXP\LPC2468-EA\IAR\OS-View\Flash\List\ #
# -o D:\work\资料\嵌入式操作系统\UCOS-II\Micrium\Softw #
# are\EvalBoards\NXP\LPC2468-EA\IAR\OS-View\Flash\Obj\ #
# -z3 --no_cse --no_unroll --no_inline #
# --no_code_motion --no_tbaa --no_clustering #
# --no_scheduling --debug --cpu_mode arm --endian #
# little --cpu ARM7TDMI-S --stack_align 4 -e --fpu #
# None --dlib_config "C:\Program Files\IAR #
# Systems\Embedded Workbench 4.0 #
# Kickstart\arm\LIB\dl4tpannl8n.h" -I #
# D:\work\资料\嵌入式操作系统\UCOS-II\Micrium\Software #
# \EvalBoards\NXP\LPC2468-EA\IAR\OS-View\ -I #
# D:\work\资料\嵌入式操作系统\UCOS-II\Micrium\Software #
# \EvalBoards\NXP\LPC2468-EA\IAR\OS-View\..\..\..\..\. #
# .\ucos-ii\ports\arm\generic\iar\ -I #
# D:\work\资料\嵌入式操作系统\UCOS-II\Micrium\Software #
# \EvalBoards\NXP\LPC2468-EA\IAR\OS-View\..\..\..\..\. #
# .\ucos-ii\source\ -I D:\work\资料\嵌入式操作系统\UCO #
# S-II\Micrium\Software\EvalBoards\NXP\LPC2468-EA\IAR\ #
# OS-View\..\..\..\..\..\ucosview\source\ -I #
# D:\work\资料\嵌入式操作系统\UCOS-II\Micrium\Software #
# \EvalBoards\NXP\LPC2468-EA\IAR\OS-View\..\..\..\..\. #
# .\ucosview\ports\arm7\lpc2468\iar\ -I #
# D:\work\资料\嵌入式操作系统\UCOS-II\Micrium\Software #
# \EvalBoards\NXP\LPC2468-EA\IAR\OS-View\..\..\..\..\. #
# .\uc-lib\ -I D:\work\资料\嵌入式操作系统\UCOS-II\Mic #
# rium\Software\EvalBoards\NXP\LPC2468-EA\IAR\OS-View\ #
# ..\..\..\..\..\uc-cpu\ -I #
# D:\work\资料\嵌入式操作系统\UCOS-II\Micrium\Software #
# \EvalBoards\NXP\LPC2468-EA\IAR\OS-View\..\..\..\..\. #
# .\uc-cpu\arm\IAR\ -I D:\work\资料\嵌入式操作系统\UCO #
# S-II\Micrium\Software\EvalBoards\NXP\LPC2468-EA\IAR\ #
# OS-View\..\BSP\ -I "C:\Program Files\IAR #
# Systems\Embedded Workbench 4.0 Kickstart\arm\INC\" #
# List file = D:\work\资料\嵌入式操作系统\UCOS-II\Micrium\Software #
# \EvalBoards\NXP\LPC2468-EA\IAR\OS-View\Flash\List\os #
# _time.lst #
# Object file = D:\work\资料\嵌入式操作系统\UCOS-II\Micrium\Software #
# \EvalBoards\NXP\LPC2468-EA\IAR\OS-View\Flash\Obj\os_ #
# time.r79 #
# #
# #
##############################################################################
D:\work\资料\嵌入式操作系统\UCOS-II\Micrium\Software\uCOS-II\Source\os_time.c
1 /*
2 *********************************************************************************************************
3 * uC/OS-II
4 * The Real-Time Kernel
5 * TIME MANAGEMENT
6 *
7 * (c) Copyright 1992-2007, Jean J. Labrosse, Weston, FL
8 * All Rights Reserved
9 *
10 * File : OS_TIME.C
11 * By : Jean J. Labrosse
12 * Version : V2.84
13 *
14 * LICENSING TERMS:
15 * ---------------
16 * uC/OS-II is provided in source form for FREE evaluation, for educational use or for peaceful research.
17 * If you plan on using uC/OS-II in a commercial product you need to contact Micri祄 to properly license
18 * its use in your product. We provide ALL the source code for your convenience and to help you experience
19 * uC/OS-II. The fact that the source is provided does NOT mean that you can use it without paying a
20 * licensing fee.
21 *********************************************************************************************************
22 */
23
24 #ifndef OS_MASTER_FILE
25 #include <ucos_ii.h>
26 #endif
27
28 /*
29 *********************************************************************************************************
30 * DELAY TASK 'n' TICKS (n from 0 to 65535)
31 *
32 * Description: This function is called to delay execution of the currently running task until the
33 * specified number of system ticks expires. This, of course, directly equates to delaying
34 * the current task for some time to expire. No delay will result If the specified delay is
35 * 0. If the specified delay is greater than 0 then, a context switch will result.
36 *
37 * Arguments : ticks is the time delay that the task will be suspended in number of clock 'ticks'.
38 * Note that by specifying 0, the task will not be delayed.
39 *
40 * Returns : none
41 *********************************************************************************************************
42 */
43
\ In segment CODE, align 4, keep-with-next
44 void OSTimeDly (INT16U ticks)
45 {
\ OSTimeDly:
\ 00000000 10402DE9 PUSH {R4,LR}
\ 00000004 0040B0E1 MOVS R4,R0
46 INT8U y;
47 #if OS_CRITICAL_METHOD == 3 /* Allocate storage for CPU status register */
48 OS_CPU_SR cpu_sr = 0;
\ 00000008 0000A0E3 MOV R0,#+0
49 #endif
50
51
52
53 if (ticks > 0) { /* 0 means no delay! */
\ 0000000C 010054E3 CMP R4,#+1
\ 00000010 1E00003A BCC ??OSTimeDly_0
54 OS_ENTER_CRITICAL();
\ 00000014 ........ _BLF OS_CPU_SR_Save,??OS_CPU_SR_Save??rA
55 y = OSTCBCur->OSTCBY; /* Delay current task */
\ 00000018 74109FE5 LDR R1,??OSTimeDly_1 ;; OSTCBCur
\ 0000001C 001091E5 LDR R1,[R1, #+0]
\ 00000020 3010D1E5 LDRB R1,[R1, #+48]
56 OSRdyTbl[y] &= ~OSTCBCur->OSTCBBitX;
\ 00000024 0120B0E1 MOVS R2,R1
\ 00000028 ........ LDR R3,??DataTable8 ;; OSRdyTbl
\ 0000002C 01C0B0E1 MOVS R12,R1
\ 00000030 ........ LDR LR,??DataTable8 ;; OSRdyTbl
\ 00000034 0EC0DCE7 LDRB R12,[R12, +LR]
\ 00000038 54E09FE5 LDR LR,??OSTimeDly_1 ;; OSTCBCur
\ 0000003C 00E09EE5 LDR LR,[LR, #+0]
\ 00000040 31E0DEE5 LDRB LR,[LR, #+49]
\ 00000044 0EC0DCE1 BICS R12,R12,LR
\ 00000048 03C0C2E7 STRB R12,[R2, +R3]
57 if (OSRdyTbl[y] == 0) {
\ 0000004C ........ LDR R2,??DataTable8 ;; OSRdyTbl
\ 00000050 0210D1E7 LDRB R1,[R1, +R2]
\ 00000054 000051E3 CMP R1,#+0
\ 00000058 0700001A BNE ??OSTimeDly_2
58 OSRdyGrp &= ~OSTCBCur->OSTCBBitY;
\ 0000005C ........ LDR R1,??DataTable6 ;; OSRdyGrp
\ 00000060 ........ LDR R2,??DataTable6 ;; OSRdyGrp
\ 00000064 0020D2E5 LDRB R2,[R2, #+0]
\ 00000068 24309FE5 LDR R3,??OSTimeDly_1 ;; OSTCBCur
\ 0000006C 003093E5 LDR R3,[R3, #+0]
\ 00000070 3230D3E5 LDRB R3,[R3, #+50]
\ 00000074 0320D2E1 BICS R2,R2,R3
\ 00000078 0020C1E5 STRB R2,[R1, #+0]
59 }
60 OSTCBCur->OSTCBDly = ticks; /* Load ticks in TCB */
\ ??OSTimeDly_2:
\ 0000007C 10109FE5 LDR R1,??OSTimeDly_1 ;; OSTCBCur
\ 00000080 001091E5 LDR R1,[R1, #+0]
\ 00000084 BA42C1E1 STRH R4,[R1, #+42]
61 OS_EXIT_CRITICAL();
\ 00000088 ........ _BLF OS_CPU_SR_Restore,??OS_CPU_SR_Restore??rA
62 OS_Sched(); /* Find next task to run! */
\ 0000008C ........ _BLF OS_Sched,??OS_Sched??rA
63 }
64 }
\ ??OSTimeDly_0:
\ 00000090 1080BDE8 POP {R4,PC} ;; return
\ ??OSTimeDly_1:
\ 00000094 ........ DC32 OSTCBCur
65 /*$PAGE*/
66 /*
67 *********************************************************************************************************
68 * DELAY TASK FOR SPECIFIED TIME
69 *
70 * Description: This function is called to delay execution of the currently running task until some time
71 * expires. This call allows you to specify the delay time in HOURS, MINUTES, SECONDS and
72 * MILLISECONDS instead of ticks.
73 *
74 * Arguments : hours specifies the number of hours that the task will be delayed (max. is 255)
75 * minutes specifies the number of minutes (max. 59)
76 * seconds specifies the number of seconds (max. 59)
77 * milli specifies the number of milliseconds (max. 999)
78 *
79 * Returns : OS_ERR_NONE
80 * OS_ERR_TIME_INVALID_MINUTES
81 * OS_ERR_TIME_INVALID_SECONDS
82 * OS_ERR_TIME_INVALID_MS
83 * OS_ERR_TIME_ZERO_DLY
84 *
85 * Note(s) : The resolution on the milliseconds depends on the tick rate. For example, you can't do
86 * a 10 mS delay if the ticker interrupts every 100 mS. In this case, the delay would be
87 * set to 0. The actual delay is rounded to the nearest tick.
88 *********************************************************************************************************
89 */
90
91 #if OS_TIME_DLY_HMSM_EN > 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -