summaryrefslogtreecommitdiff
path: root/ao_adc.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-04-14 19:08:01 -0700
committerKeith Packard <keithp@keithp.com>2009-04-14 19:08:01 -0700
commitacc4fc635edb70ec1ba2dff9f7ac0c8542c72c47 (patch)
treede8ce5e1cdfb925cfdb3be15e75c7e3e1c4d5c52 /ao_adc.c
parentac99982b10fd5772218660137ee21db9b90cd885 (diff)
Add in existing flight pieces: flight/report/log
These pieces come from the old telemetrum firmware. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao_adc.c')
-rw-r--r--ao_adc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ao_adc.c b/ao_adc.c
index 549cc944..8834f26e 100644
--- a/ao_adc.c
+++ b/ao_adc.c
@@ -18,7 +18,7 @@
#include "ao.h"
-volatile __xdata struct ao_adc ao_adc_ring[ADC_RING];
+volatile __xdata struct ao_adc ao_adc_ring[AO_ADC_RING];
volatile __data uint8_t ao_adc_head;
void
@@ -38,7 +38,7 @@ ao_adc_get(__xdata struct ao_adc *packet)
{
uint8_t i = ao_adc_head;
if (i == 0)
- i = ADC_RING;
+ i = AO_ADC_RING;
i--;
memcpy(packet, &ao_adc_ring[i], sizeof (struct ao_adc));
}
@@ -60,7 +60,7 @@ ao_adc_isr(void) interrupt 1
/* record this conversion series */
ao_adc_ring[ao_adc_head].tick = ao_time();
ao_adc_head++;
- if (ao_adc_head == ADC_RING)
+ if (ao_adc_head == AO_ADC_RING)
ao_adc_head = 0;
ao_wakeup(ao_adc_ring);
}