📄 os_time.lst
字号:
\ 00000042 06D0 BEQ.N ??OSTimeDlyResume_5
196 ptcb->OSTCBStat &= ~OS_STAT_PEND_ANY; /* Yes, Clear status flag */
\ 00000044 1A46 MOV R2,R3
\ 00000046 12F0C802 ANDS R2,R2,#0xC8
\ 0000004A 8A70 STRB R2,[R1, #+2]
197 ptcb->OSTCBStatPend = OS_STAT_PEND_TO; /* Indicate PEND timeout */
\ 0000004C 0122 MOVS R2,#+1
\ 0000004E CA70 STRB R2,[R1, #+3]
\ 00000050 00E0 B.N ??OSTimeDlyResume_6
198 } else {
199 ptcb->OSTCBStatPend = OS_STAT_PEND_OK;
\ ??OSTimeDlyResume_5:
\ 00000052 CA70 STRB R2,[R1, #+3]
200 }
201 if ((ptcb->OSTCBStat & OS_STAT_SUSPEND) == OS_STAT_RDY) { /* Is task suspended? */
\ ??OSTimeDlyResume_6:
\ 00000054 8A78 LDRB R2,[R1, #+2]
\ 00000056 1207 LSLS R2,R2,#+28
\ 00000058 10D4 BMI.N ??OSTimeDlyResume_7
202 OSRdyGrp |= ptcb->OSTCBBitY; /* No, Make ready */
\ 0000005A .... LDR.N R2,??DataTable4 ;; OSRdyGrp
\ 0000005C 1378 LDRB R3,[R2, #+0]
\ 0000005E 0C7A LDRB R4,[R1, #+8]
\ 00000060 1C43 ORRS R4,R4,R3
\ 00000062 1470 STRB R4,[R2, #+0]
203 OSRdyTbl[ptcb->OSTCBY] |= ptcb->OSTCBBitX;
\ 00000064 .... LDR.N R2,??DataTable5 ;; OSRdyTbl
\ 00000066 8B79 LDRB R3,[R1, #+6]
\ 00000068 1C46 MOV R4,R3
\ 0000006A 145D LDRB R4,[R2, R4]
\ 0000006C C979 LDRB R1,[R1, #+7]
\ 0000006E 2143 ORRS R1,R1,R4
\ 00000070 D154 STRB R1,[R2, R3]
204 OS_EXIT_CRITICAL();
\ 00000072 ........ _BLF OS_CPU_SR_Restore,??OS_CPU_SR_Restore??rT
205 OS_Sched(); /* See if this is new highest priority */
\ 00000076 ........ _BLF OS_Sched,??OS_Sched??rT
\ 0000007A 01E0 B.N ??OSTimeDlyResume_8
206 } else {
207 OS_EXIT_CRITICAL(); /* Task may be suspended */
\ ??OSTimeDlyResume_7:
\ 0000007C ........ _BLF OS_CPU_SR_Restore,??OS_CPU_SR_Restore??rT
208 }
209 return (OS_ERR_NONE);
\ ??OSTimeDlyResume_8:
\ 00000080 0020 MOVS R0,#+0
\ 00000082 10BD POP {R4,PC} ;; return
\ ??OSTimeDlyResume_1:
\ 00000084 ........ DC32 OSTCBPrioTbl
210 }
211 #endif
212 /*$PAGE*/
213 /*
214 *********************************************************************************************************
215 * GET CURRENT SYSTEM TIME
216 *
217 * Description: This function is used by your application to obtain the current value of the 32-bit
218 * counter which keeps track of the number of clock ticks.
219 *
220 * Arguments : none
221 *
222 * Returns : The current value of OSTime
223 *********************************************************************************************************
224 */
225
226 #if OS_TIME_GET_SET_EN > 0
\ In segment CODE, align 4, keep-with-next
227 INT32U OSTimeGet (void)
228 {
\ OSTimeGet:
\ 00000000 10B5 PUSH {R4,LR}
229 INT32U ticks;
230 #if OS_CRITICAL_METHOD == 3 /* Allocate storage for CPU status register */
231 OS_CPU_SR cpu_sr = 0;
232 #endif
233
234
235
236 OS_ENTER_CRITICAL();
\ 00000002 ........ _BLF OS_CPU_SR_Save,??OS_CPU_SR_Save??rT
237 ticks = OSTime;
\ 00000006 .... LDR.N R1,??DataTable7 ;; OSTime
\ 00000008 0C68 LDR R4,[R1, #+0]
238 OS_EXIT_CRITICAL();
\ 0000000A ........ _BLF OS_CPU_SR_Restore,??OS_CPU_SR_Restore??rT
239 return (ticks);
\ 0000000E 2000 MOVS R0,R4
\ 00000010 10BD POP {R4,PC} ;; return
240 }
241 #endif
242
243 /*
244 *********************************************************************************************************
245 * SET SYSTEM CLOCK
246 *
247 * Description: This function sets the 32-bit counter which keeps track of the number of clock ticks.
248 *
249 * Arguments : ticks specifies the new value that OSTime needs to take.
250 *
251 * Returns : none
252 *********************************************************************************************************
253 */
254
255 #if OS_TIME_GET_SET_EN > 0
\ In segment CODE, align 4, keep-with-next
256 void OSTimeSet (INT32U ticks)
257 {
\ OSTimeSet:
\ 00000000 10B5 PUSH {R4,LR}
\ 00000002 0400 MOVS R4,R0
258 #if OS_CRITICAL_METHOD == 3 /* Allocate storage for CPU status register */
259 OS_CPU_SR cpu_sr = 0;
260 #endif
261
262
263
264 OS_ENTER_CRITICAL();
\ 00000004 ........ _BLF OS_CPU_SR_Save,??OS_CPU_SR_Save??rT
265 OSTime = ticks;
\ 00000008 .... LDR.N R1,??DataTable7 ;; OSTime
\ 0000000A 0C60 STR R4,[R1, #+0]
266 OS_EXIT_CRITICAL();
\ 0000000C ........ _BLF OS_CPU_SR_Restore,??OS_CPU_SR_Restore??rT
267 }
\ 00000010 10BD POP {R4,PC} ;; return
\ In segment CODE, align 4, keep-with-next
\ ??DataTable3:
\ 00000000 ........ DC32 OSIntNesting
\ In segment CODE, align 4, keep-with-next
\ ??DataTable4:
\ 00000000 ........ DC32 OSRdyGrp
\ In segment CODE, align 4, keep-with-next
\ ??DataTable5:
\ 00000000 ........ DC32 OSRdyTbl
\ In segment CODE, align 4, keep-with-next
\ ??DataTable7:
\ 00000000 ........ DC32 OSTime
268 #endif
Maximum stack usage in bytes:
Function CSTACK
-------- ------
OSTimeDly 12
OSTimeDlyHMSM 12
OSTimeDlyResume 8
OSTimeGet 8
OSTimeSet 8
Segment part sizes:
Function/Label Bytes
-------------- -----
OSTimeDly 68
OSTimeDlyHMSM 84
OSTimeDlyResume 136
OSTimeGet 18
OSTimeSet 18
??DataTable3 4
??DataTable4 4
??DataTable5 4
??DataTable7 4
Others 24
364 bytes in segment CODE
340 bytes of CODE memory (+ 24 bytes shared)
Errors: none
Warnings: none
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -