diff options
author | Keith Packard <keithp@keithp.com> | 2011-01-15 12:18:32 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-01-16 20:24:36 -0800 |
commit | 2681a17500913cbaf3966f09380bb1d6b59e3863 (patch) | |
tree | 8e7860c8aadea07692860b6d748ca005a7469264 /src/ao.h | |
parent | 69290588980bb15732a99eca5c911a3b6e9a37b9 (diff) |
altos: Sample the accelerometer reference voltage on v1.1 boards
This places the 5v reference samples in an array parallel to the basic
ADC values. It doesn't do anything with the values, just stores them.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao.h')
-rw-r--r-- | src/ao.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -163,6 +163,11 @@ struct ao_adc { #endif #if HAS_ADC + +#ifndef HAS_ACCEL_REF +#error Please define HAS_ACCEL_REF +#endif + /* * ao_adc.c */ @@ -178,6 +183,9 @@ struct ao_adc { */ extern volatile __xdata struct ao_adc ao_adc_ring[AO_ADC_RING]; extern volatile __data uint8_t ao_adc_head; +#if HAS_ACCEL_REF +extern volatile __xdata uint16_t ao_accel_ref[AO_ADC_RING]; +#endif /* Trigger a conversion sequence (called from the timer interrupt) */ void |