diff options
author | Keith Packard <keithp@keithp.com> | 2011-01-15 00:50:39 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-01-15 00:50:39 -0800 |
commit | e13337cfb536ff65979b655f1763d62ec0126c67 (patch) | |
tree | bab19228119919a0ff234d4a3ce7af2f9ff75549 /src/ao.h | |
parent | 35adb7c98fe02e84fff70c1bee22bfa019cfacc2 (diff) |
altos: Add 5V reference computation for v1.1 boards.
This should compensate for changes in the 3.3V voltage.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao.h')
-rw-r--r-- | src/ao.h | 10 |
1 files changed, 9 insertions, 1 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 @@ -649,7 +657,7 @@ enum ao_flight_state { ao_flight_invalid = 9 }; -extern __xdata struct ao_adc ao_flight_data; +extern __data uint8_t ao_flight_adc; extern __pdata enum ao_flight_state ao_flight_state; extern __pdata uint16_t ao_flight_tick; extern __pdata int16_t ao_flight_accel; |