summaryrefslogtreecommitdiff
path: root/src/drivers/ao_hmc5883.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-10-08 23:04:16 -0700
committerKeith Packard <keithp@keithp.com>2012-10-08 23:04:16 -0700
commit39c5738acdfdf0c87b64de6135fe107971cfa12b (patch)
tree067882f873e36200f38fde4805600b6f10e68a78 /src/drivers/ao_hmc5883.c
parent16bbe9d25856259d2694751c364b668638e4a971 (diff)
altos: Go back to recording sensor data in globalsmm-ms5611
Instead of trying to get things into the ring from a variety of functions, go back to the simpler method of storing them in globals and having the ADC code just pluck out the most recent values. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/drivers/ao_hmc5883.c')
-rw-r--r--src/drivers/ao_hmc5883.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/drivers/ao_hmc5883.c b/src/drivers/ao_hmc5883.c
index ade6c263..059fc2c8 100644
--- a/src/drivers/ao_hmc5883.c
+++ b/src/drivers/ao_hmc5883.c
@@ -123,12 +123,14 @@ ao_hmc5883_setup(void)
return 1;
}
+struct ao_hmc5883_sample ao_hmc5883_current;
+
static void
ao_hmc5883(void)
{
ao_hmc5883_setup();
for (;;) {
- ao_hmc5883_sample((struct ao_hmc5883_sample *) &ao_data_ring[ao_data_head].hmc5883);
+ ao_hmc5883_sample(&ao_hmc5883_current);
ao_arch_critical(
AO_DATA_PRESENT(AO_DATA_HMC5883);
AO_DATA_WAIT();