aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/exti.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmaple/exti.c')
-rw-r--r--libmaple/exti.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libmaple/exti.c b/libmaple/exti.c
index 496f0a1..150dd05 100644
--- a/libmaple/exti.c
+++ b/libmaple/exti.c
@@ -180,11 +180,11 @@ void exti_attach_interrupt(uint32 port,
break;
}
- /* Configure the enable interrupt bits for the NVIC */
- nvic_irq_enable(exti_channels[channel].irq_line);
-
/* Register the handler */
exti_channels[channel].handler = handler;
+
+ /* Configure the enable interrupt bits for the NVIC */
+ nvic_irq_enable(exti_channels[channel].irq_line);
}