; myASM.arm ; Used to wrap the c interrupt handler ; for the keypad encoder .text ; place in the correct section text = code .include "periph/aic/irq.mac" .global irqasmhandler ; linker needs to know they are here! .global EnableInterrupt .import intHandler ENABLE_INT .equ 0x3F .align 4 .nothumb EXPORT irqasmhandler EXPORT EnableInterrupt irqasmhandler: ; put your code here ; ; IRQ_ENTRY ldr r0,=intHandler mov r14,PC bx r0 IRQ_EXIT ;ret ; ret always does the right thing regardless of mode (thumb or arm) .type irqasmhandler, $function .size irqasmhandler, .-irqasmhandler EnableInterrupt: MRS R0, CPSR AND R1,R0, #ENABLE_INT MSR CPSR_c,R1 ret .type EnableInterrupt, $function .size EnableInterrupt, .-EnableInterrupt .end