summaryrefslogtreecommitdiff
path: root/src/stm/ao_adc_stm.c
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2013-05-16 00:36:23 -0600
committerBdale Garbee <bdale@gag.com>2013-05-16 00:36:23 -0600
commit02d111b1b53ef01fc6e9ab6c4bc60b8af1be0067 (patch)
tree8356f4a019969ee99a45e264c87d38555cf316cc /src/stm/ao_adc_stm.c
parent7a2e1f05adad990a6b161865267abf07ffec7a7e (diff)
parent7699a55aed3a9a7daeb4c6a5a9a280f43edf455f (diff)
Merge branch 'branch-1.2' into debian
Diffstat (limited to 'src/stm/ao_adc_stm.c')
-rw-r--r--src/stm/ao_adc_stm.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/stm/ao_adc_stm.c b/src/stm/ao_adc_stm.c
index 18ca6ea0..48fc4262 100644
--- a/src/stm/ao_adc_stm.c
+++ b/src/stm/ao_adc_stm.c
@@ -43,6 +43,23 @@ static void ao_adc_done(int index)
{
AO_DATA_PRESENT(AO_DATA_ADC);
ao_dma_done_transfer(STM_DMA_INDEX(STM_DMA_CHANNEL_ADC1));
+ if (ao_data_present == AO_DATA_ALL) {
+#if HAS_MS5607
+ ao_data_ring[ao_data_head].ms5607_raw = ao_ms5607_current;
+#endif
+#if HAS_MMA655X
+ ao_data_ring[ao_data_head].mma655x = ao_mma655x_current;
+#endif
+#if HAS_HMC5883
+ ao_data_ring[ao_data_head].hmc5883 = ao_hmc5883_current;
+#endif
+#if HAS_MPU6000
+ ao_data_ring[ao_data_head].mpu6000 = ao_mpu6000_current;
+#endif
+ ao_data_ring[ao_data_head].tick = ao_tick_count;
+ ao_data_head = ao_data_ring_next(ao_data_head);
+ ao_wakeup((void *) &ao_data_head);
+ }
ao_adc_ready = 1;
}