?? bsp_a.s
字號:
;********************************************************************************************************
; uC/OS-II
; The Real-Time Kernel
;
; (c) Copyright 1992-2004, Jean J. Labrosse, Weston, FL
; All Rights Reserved
;
; AT91 BOARD SUPPORT PACKAGE
; IAR C Compiler
;
; File : BSP_A.ASM
; By : Jean J. Labrosse
;********************************************************************************************************
EXTERN OSIntCtxSwFlag
EXTERN OSIntEnter
EXTERN OSIntExit
EXTERN OS_IntCtxSw
EXTERN Tmr_TickISR_Handler
PUBLIC Tmr_TickISR
;*********************************************************************************************************
; TICK HANDLER
;
; Description: This handles all the Timer #0 interrupt which is used to generate the uC/OS-II tick.
;*********************************************************************************************************
RSEG CODE:CODE:NOROOT(2)
CODE32
Tmr_TickISR
STMFD SP!,{R0-R3,R12,LR}
BL OSIntEnter ; Indicate beginning of ISR
BL Tmr_TickISR_Handler ; Handle interrupt (see BSP.C)
BL OSIntExit ; Indicate end of ISR
LDR R0,??OS_IntCtxSwFlag ; See if we need to do a context switch
LDR R1,[R0]
CMP R1,#1
BEQ OS_IntCtxSw ; Yes, Switch to Higher Priority Task
LDMFD SP!,{R0-R3,R12,LR} ; No, Restore registers of interrupted task's stack
SUBS PC,LR,#4 ; Return from IRQ
;*********************************************************************************************************
; POINTERS TO VARIABLES
;*********************************************************************************************************
DATA
??OS_IntCtxSwFlag:
DC32 OSIntCtxSwFlag
END
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -