Skip to content

Commit 8da5345

Browse files
committed
Fixed LPC1114 InterruptIn for Port1 (and higher)
Channel was only calculated using bits set, port number was ignored.
1 parent fb3fe60 commit 8da5345

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)