⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 call_int.s

📁 在arm9实现了一个简单的触摸屏演示实验,可以实现了简单触摸功能.
💻 S
字号:
/* For the fault of GNU GCC for ARM compiler to compile the interrupt function as:
    void user_handle(void) __attribute__ ((interrupt ("IRQ"))); // NOT RECOMMEND
    void user_handle(void); // RECOMMEND
#------------------------------------------------------------------------------
#- Entry function:	void	irqEntry(void)
#- Extern function:	void	isrHandle(void)
#------------------------------------------------------------------------------
#		.INCLUDE	"include.x"
*/
		.macro IRQHandle isrHandle:
		stmdb	sp!, {r0-r11, ip, lr}	/* save r0-r11, ip, lr */
		ldr		r0, =\isrHandle
		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:
@ void TSInt (void); ---> The interrupt handle function write as C program, it is user application func.
@ isrEINT2           ---> It is the interrupt vactor entry function to jump here, call by INTERRUPT  VECTOR TABLE.
@ TSP_INT            ---> modify Project ->Settings >Assembler >General category >Predefines: set as
								TSP_INT=1 
						  OR '#define TSP_INT' or '.EQU TSP_INT' in source file (except this file).
       .extern TSInt
       .global isrEINT2	
isrEINT2:
.ifdef TSP_INT
       IRQHandle TSInt
.endif
*/
@--------------------------------------------
       .extern tsp_int_normal
       .global isrADC_normal
isrADC_normal:
.ifdef TSP_INT
       IRQHandle tsp_int_normal
.endif


@-------------------------------------------- if no isr, return directly
		subs	pc, r14, #4				/* return from interrupt */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -