?? 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 + -