diff options
author | Keith Packard <keithp@keithp.com> | 2012-10-16 22:21:04 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-10-16 22:32:10 -0700 |
commit | f34f0ac7f355149446374a4c82dbf004919bc2dd (patch) | |
tree | 580f96d5391da876076cb08c49eaf644cc3dc486 /src/avr | |
parent | 14698c424f833dc6d2fb38f69f5f661804cf8303 (diff) |
altos: Add telescience-pwm product
Split out special PWM-sampling telescience product
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/avr')
-rw-r--r-- | src/avr/ao_adc_avr.c | 2 | ||||
-rw-r--r-- | src/avr/ao_pwmin.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/avr/ao_adc_avr.c b/src/avr/ao_adc_avr.c index 739a6d4a..231512b2 100644 --- a/src/avr/ao_adc_avr.c +++ b/src/avr/ao_adc_avr.c @@ -94,7 +94,7 @@ ISR(ADC_vect) value = ADCL; value |= (ADCH << 8); ao_data_ring[ao_data_head].adc.adc[ao_adc_channel] = value; - if (++ao_adc_channel < NUM_ADC - 1) + if (++ao_adc_channel < NUM_ADC - HAS_ICP3_COUNT) ao_adc_start(); else { #if HAS_ICP3_COUNT diff --git a/src/avr/ao_pwmin.h b/src/avr/ao_pwmin.h index bbab4ddc..8097d399 100644 --- a/src/avr/ao_pwmin.h +++ b/src/avr/ao_pwmin.h @@ -16,3 +16,5 @@ */ void ao_pwmin_init(void); + +extern volatile __data uint16_t ao_icp3_count; |