summaryrefslogtreecommitdiff
path: root/src/drivers/ao_ms5607.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/ao_ms5607.c')
-rw-r--r--src/drivers/ao_ms5607.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/drivers/ao_ms5607.c b/src/drivers/ao_ms5607.c
index 0afdf012..914e0c1b 100644
--- a/src/drivers/ao_ms5607.c
+++ b/src/drivers/ao_ms5607.c
@@ -201,11 +201,13 @@ __xdata struct ao_ms5607_sample ao_ms5607_current;
static void
ao_ms5607(void)
{
+ struct ao_ms5607_sample sample;
ao_ms5607_setup();
for (;;)
{
- ao_ms5607_sample(&ao_ms5607_current);
+ ao_ms5607_sample(&sample);
ao_arch_block_interrupts();
+ ao_ms5607_current = sample;
AO_DATA_PRESENT(AO_DATA_MS5607);
AO_DATA_WAIT();
ao_arch_release_interrupts();