projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
572e166
)
altos: Disable MS5607 interrupt in the handler
altosdroid
author
Keith Packard
<keithp@keithp.com>
Thu, 28 Jun 2012 23:05:56 +0000
(16:05 -0700)
committer
Keith Packard
<keithp@keithp.com>
Thu, 28 Jun 2012 23:05:56 +0000
(16:05 -0700)
Avoids having the interrupt re-raised multiple times until the reading
task finally wakes up.
Signed-off-by: Keith Packard <keithp@keithp.com>
src/drivers/ao_ms5607.c
patch
|
blob
|
history
diff --git
a/src/drivers/ao_ms5607.c
b/src/drivers/ao_ms5607.c
index e1d0507ee8826b955f1e2a2075d8b1522a52b682..17fe853bc1d336a76cb4f838e7c5289c0cfa6c3e 100644
(file)
--- 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();