Merge pull request #171 from Sissors/master

Fixed LPC1114 InterruptIn for Port1 (and higher)
pull/173/head
Emilio Monti 2014-02-18 10:19:35 +00:00
commit a2a5490f5d
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ static inline void handle_interrupt_in(uint32_t port) {
LPC_GPIO_TypeDef *port_reg = ((LPC_GPIO_TypeDef *) (LPC_GPIO0_BASE + (port * 0x10000)));
// Get index of function table from Mask Interrupt Status register
channel = numofbits(port_reg->MIS - 1);
channel = numofbits(port_reg->MIS - 1) + (port * 12);
if (port_reg->MIS & port_reg->IBE) {
// both edge, read the level of pin