From: Keith Packard Date: Thu, 28 Jun 2012 23:05:56 +0000 (-0700) Subject: altos: Disable MS5607 interrupt in the handler X-Git-Tag: 1.0.9.6~2 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=ca1bc20735a170a77066f5f37e0ad728899a3989 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 --- 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();