diff options
author | Keith Packard <keithp@keithp.com> | 2010-02-20 20:22:16 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-02-20 20:30:27 -0800 |
commit | 84c93bb2fc4558a5e4654794ba90e730a84eaf67 (patch) | |
tree | 4d279672734ec5c3e50976917ccbf33a306a740d /src/ao_adc.c | |
parent | fd0a42e0e96dcb8ecc9e999f70bcf70692692af9 (diff) |
Change altos build process to support per-product compile-time changes
This creates per-product subdirectories and recompiles everything for
each product, allowing per-product compile-time changes for things
like peripheral pin assignments and attached serial devices.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao_adc.c')
-rw-r--r-- | src/ao_adc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ao_adc.c b/src/ao_adc.c index 2b972e6c..50f96848 100644 --- a/src/ao_adc.c +++ b/src/ao_adc.c @@ -16,6 +16,7 @@ */ #include "ao.h" +#include "ao_pins.h" volatile __xdata struct ao_adc ao_adc_ring[AO_ADC_RING]; volatile __data uint8_t ao_adc_head; @@ -52,11 +53,13 @@ ao_adc_isr(void) interrupt 1 a[0] = ADCL; a[1] = ADCH; if (sequence < 5) { +#if HAS_EXTERNAL_TEMP == 0 /* start next channel conversion */ /* v0.2 replaces external temp sensor with internal one */ if (sequence == 1) ADCCON3 = ADCCON3_EREF_1_25 | ADCCON3_EDIV_512 | ADCCON3_ECH_TEMP; else +#endif ADCCON3 = ADCCON3_EREF_VDD | ADCCON3_EDIV_512 | (sequence + 1); } else { /* record this conversion series */ @@ -86,7 +89,9 @@ ao_adc_init(void) { ADCCFG = ((1 << 0) | /* acceleration */ (1 << 1) | /* pressure */ -/* (1 << 2) | v0.1 temperature */ +#if HAS_EXTERNAL_TEMP + (1 << 2) | /* v0.1 temperature */ +#endif (1 << 3) | /* battery voltage */ (1 << 4) | /* drogue sense */ (1 << 5)); /* main sense */ |