Jeroen van Zoeren / mbed-dev

Dependents:   Ophaalbrug-dev

Fork of mbed-dev by mbed official

Files at this revision

API Documentation at this revision

Comitter:
jeroenvz
Date:
Thu Jan 14 18:52:28 2016 +0000
Parent:
45:faebcbaa5f6d
Commit message:
- LPCXpresso Interrupt fix

Changed in this revision

targets/hal/TARGET_NXP/TARGET_LPC43XX/gpio_irq_api.c Show annotated file Show diff for this revision Revisions of this file
--- a/targets/hal/TARGET_NXP/TARGET_LPC43XX/gpio_irq_api.c	Wed Jan 06 15:00:11 2016 +0000
+++ b/targets/hal/TARGET_NXP/TARGET_LPC43XX/gpio_irq_api.c	Thu Jan 14 18:52:28 2016 +0000
@@ -85,10 +85,10 @@
 
     /* Set SCU */
     if (channel < 4) {
-        LPC_SCU->PINTSEL0 &= ~(0xFF << (portnum << 3));
+        LPC_SCU->PINTSEL0 &= ~(0xFF << (channel << 3));
         LPC_SCU->PINTSEL0 |= (((portnum << 5) | pinnum) << (channel << 3));
     } else {
-        LPC_SCU->PINTSEL1 &= ~(0xFF << ((portnum - 4) << 3));
+        LPC_SCU->PINTSEL1 &= ~(0xFF << ((channel - 4) << 3));
         LPC_SCU->PINTSEL1 |= (((portnum << 5) | pinnum) << ((channel - 4) << 3));
     }