diff options
author | Keith Packard <keithp@keithp.com> | 2013-05-19 20:04:29 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-05-19 20:04:29 -0700 |
commit | 35a05041d3ca3e69a146bd3bf8038c0f1cbc1b42 (patch) | |
tree | 8877862f68b7139b605711cabbcf37151325e583 /src/lpc/ao_exti_lpc.c | |
parent | 098fd43a740ee2a782f82b6b71965b60cdba2d62 (diff) |
altos: Add EXTI_PIN_NOCONFIGURE to exti interface, use for MS5607
This asks the EXTI code to not mess with the pin configuration so that
the MS5607 driver can get interrupts on the MISO pin while still using
it for SPI.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lpc/ao_exti_lpc.c')
-rw-r--r-- | src/lpc/ao_exti_lpc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lpc/ao_exti_lpc.c b/src/lpc/ao_exti_lpc.c index ce98b4ad..588cf58c 100644 --- a/src/lpc/ao_exti_lpc.c +++ b/src/lpc/ao_exti_lpc.c @@ -91,6 +91,9 @@ ao_exti_setup (uint8_t port, uint8_t pin, uint8_t mode, void (*callback)(void)) 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; |