📄 call_int.s
字号:
/*
#------------------------------------------------------------------------------
#- Entry function: void user_irq(void)
#- Extern function: void user_handle(void)
#------------------------------------------------------------------------------
# .INCLUDE "include.x"
*/
.macro IRQHandle user_handle:
stmdb sp!, {r0-r11, ip, lr} /* save r0-r11, ip, lr */
ldr r0, =\user_handle
mov lr, pc
bx r0 /* jump to user_handle(void) */
ldmia sp!, {r0-r11, ip, lr} /* restore r0, ip, lr */
subs pc, r14, #4 /* return from interrupt */
.endm
/* Examples showed as following: */
.extern TSInt @ void TSInt (void);---> The interrupt handle function write as C program, it is user application func.
.global user_irq1 @ ----------> It is the interrupt vactor entry function to jump here, call by INTERRUPT VECTOR TABLE.
user_irq1: IRQHandle TSInt
.extern KeyboardInt @ void KeyboardInt (void);
.global user_irq2
user_irq2: IRQHandle KeyboardInt
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -