summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-06-28 16:05:56 -0700
committerKeith Packard <keithp@keithp.com>2012-06-28 16:05:56 -0700
commitca1bc20735a170a77066f5f37e0ad728899a3989 (patch)
tree2645911d72495b8b5643495f4fe896d56bf5c751
parent572e1664938c7ce6c308b36779f6a412959e03f1 (diff)
altos: Disable MS5607 interrupt in the handleraltosdroid
Avoids having the interrupt re-raised multiple times until the reading task finally wakes up. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--src/drivers/ao_ms5607.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/ao_ms5607.c b/src/drivers/ao_ms5607.c
index e1d0507e..17fe853b 100644
--- a/src/drivers/ao_ms5607.c
+++ b/src/drivers/ao_ms5607.c
@@ -118,6 +118,7 @@ static uint8_t ao_ms5607_done;
static void
ao_ms5607_isr(void)
{
+ ao_exti_disable(AO_MS5607_MISO_GPIO, AO_MS5607_MISO);
ao_ms5607_done = 1;
ao_wakeup(&ao_ms5607_done);
}
@@ -137,7 +138,6 @@ ao_ms5607_get_sample(uint8_t cmd) {
while (!ao_ms5607_done)
ao_sleep(&ao_ms5607_done);
sei();
- ao_exti_disable(AO_MS5607_MISO_GPIO, AO_MS5607_MISO);
ao_ms5607_stop();
ao_ms5607_start();