aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2012-09-03 18:31:50 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2012-09-03 18:31:50 -0400
commitaaad051724632c85793528950ae81159f3bcd3e1 (patch)
tree13e9c77e68be756f9d13ff1c4140a0cc74ab9c21 /libmaple
parent5a5aee7906b5c11a38d2a71fc2e8849f2afae4bc (diff)
downloadlibrambutan-aaad051724632c85793528950ae81159f3bcd3e1.tar.gz
librambutan-aaad051724632c85793528950ae81159f3bcd3e1.zip
exti.c: Use exti_num enumerators instead of magic values.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'libmaple')
-rw-r--r--libmaple/exti.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/libmaple/exti.c b/libmaple/exti.c
index 91d8551..f8ee8c3 100644
--- a/libmaple/exti.c
+++ b/libmaple/exti.c
@@ -145,34 +145,34 @@ void exti_attach_callback(exti_num num,
/* Enable the interrupt line */
switch(num)
{
- case 0:
+ case EXTI0:
nvic_irq_enable(NVIC_EXTI0);
break;
- case 1:
+ case EXTI1:
nvic_irq_enable(NVIC_EXTI1);
break;
- case 2:
+ case EXTI2:
nvic_irq_enable(NVIC_EXTI2);
break;
- case 3:
+ case EXTI3:
nvic_irq_enable(NVIC_EXTI3);
break;
- case 4:
+ case EXTI4:
nvic_irq_enable(NVIC_EXTI4);
break;
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
+ case EXTI5:
+ case EXTI6:
+ case EXTI7:
+ case EXTI8:
+ case EXTI9:
nvic_irq_enable(NVIC_EXTI_9_5);
break;
- case 10:
- case 11:
- case 12:
- case 13:
- case 14:
- case 15:
+ case EXTI10:
+ case EXTI11:
+ case EXTI12:
+ case EXTI13:
+ case EXTI14:
+ case EXTI15:
nvic_irq_enable(NVIC_EXTI_15_10);
break;
}