From ca1bc20735a170a77066f5f37e0ad728899a3989 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 28 Jun 2012 16:05:56 -0700 Subject: [PATCH] altos: Disable MS5607 interrupt in the handler Avoids having the interrupt re-raised multiple times until the reading task finally wakes up. Signed-off-by: Keith Packard --- src/drivers/ao_ms5607.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- 2.30.2