Skip to content

Commit a2a5490

Browse files
committed
Merge pull request #171 from Sissors/master
Fixed LPC1114 InterruptIn for Port1 (and higher)
2 parents b87dac9 + 8da5345 commit a2a5490

File tree

1 file changed

+1
-1
lines changed
  • libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX

1 file changed

+1
-1
lines changed

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/gpio_irq_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static inline void handle_interrupt_in(uint32_t port) {
4747
LPC_GPIO_TypeDef *port_reg = ((LPC_GPIO_TypeDef *) (LPC_GPIO0_BASE + (port * 0x10000)));
4848

4949
// Get index of function table from Mask Interrupt Status register
50-
channel = numofbits(port_reg->MIS - 1);
50+
channel = numofbits(port_reg->MIS - 1) + (port * 12);
5151

5252
if (port_reg->MIS & port_reg->IBE) {
5353
// both edge, read the level of pin

0 commit comments

Comments
 (0)