summaryrefslogtreecommitdiff
path: root/src/lpc/ao_adc_lpc.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2018-10-19 08:12:22 -0700
committerKeith Packard <keithp@keithp.com>2018-10-19 08:37:56 -0700
commit80affca535c5c43a5d9963dfafc74f9675c9b155 (patch)
tree7d479a5246552cc5e86a216099d1dc06361f5419 /src/lpc/ao_adc_lpc.c
parentfacf790f469df374257440ba9482321cbab7cecb (diff)
altos: Create ao_data_fill shared function
This fills a data ring entry with all of the current sensor values other than the ADC. It is used in all of the adc completion functions. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lpc/ao_adc_lpc.c')
-rw-r--r--src/lpc/ao_adc_lpc.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/lpc/ao_adc_lpc.c b/src/lpc/ao_adc_lpc.c
index 6743c1f4..63241559 100644
--- a/src/lpc/ao_adc_lpc.c
+++ b/src/lpc/ao_adc_lpc.c
@@ -112,23 +112,7 @@ void lpc_adc_isr(void)
}
AO_DATA_PRESENT(AO_DATA_ADC);
- 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_data_fill(ao_data_head);
ao_adc_ready = 1;
}