*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
lpc_gpio_pin.sienr = mask;
else
lpc_gpio_pin.cienr = mask;
-
+
if (mode & AO_EXTI_MODE_FALLING)
lpc_gpio_pin.sienf = mask;
else
if (pint == LPC_NUM_PINT)
ao_panic(AO_PANIC_EXTI);
+ if (!(mode & AO_EXTI_PIN_NOCONFIGURE))
+ ao_enable_input(port, pin, mode);
+
ao_arch_block_interrupts();
mask = (1 << pint);
ao_pint_inuse |= mask;
ao_pint_enabled &= ~mask;
-
+
ao_pint_map[id] = pint;
ao_exti_callback[pint] = callback;