summaryrefslogtreecommitdiff
path: root/cpu/at32ap/interrupts.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpu/at32ap/interrupts.c')
-rw-r--r--cpu/at32ap/interrupts.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cpu/at32ap/interrupts.c b/cpu/at32ap/interrupts.c
index 85420a4248a..c9e04993c77 100644
--- a/cpu/at32ap/interrupts.c
+++ b/cpu/at32ap/interrupts.c
@@ -115,9 +115,12 @@ void udelay(unsigned long usec)
static int set_interrupt_handler(unsigned int nr, void (*handler)(void),
unsigned int priority)
{
+ extern void _evba(void);
unsigned long intpr;
unsigned long handler_addr = (unsigned long)handler;
+ handler_addr -= (unsigned long)&_evba;
+
if ((handler_addr & HANDLER_MASK) != handler_addr
|| (priority & INTLEV_MASK) != priority)
return -EINVAL;