bsp_a.s
来自「ucos-2在lpc2100上的移制例子。」· S 代码 · 共 62 行
S
62 行
;********************************************************************************************************
; 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 + =
减小字号Ctrl + -
显示快捷键?