From 025beb0fea011d0e3dab59b5d16e7ffae97c613c Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 17 Jun 2013 14:52:32 -0700 Subject: [PATCH] altos/lpc: Get rid of ADC filter Now that the source of the Vcc noise has been identified, remove the unnecessary ADC filtering. Signed-off-by: Keith Packard --- src/lpc/ao_adc_lpc.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/lpc/ao_adc_lpc.c b/src/lpc/ao_adc_lpc.c index 40173aa4..874d2d29 100644 --- a/src/lpc/ao_adc_lpc.c +++ b/src/lpc/ao_adc_lpc.c @@ -95,22 +95,12 @@ static uint8_t ao_adc_ready; -static uint16_t ao_adc_prev[AO_NUM_ADC]; - -#define sample(id) do { \ - uint16_t p = *prev; \ - uint16_t v = lpc_adc.dr[id]; \ - p -= p >> 4; \ - p += v >> 4; \ - *prev++ = p; \ - *out++ = p >> 1; \ - } while (0) +#define sample(id) (*out++ = lpc_adc.dr[id] >> 1) void lpc_adc_isr(void) { uint32_t stat = lpc_adc.stat; uint16_t *out; - uint16_t *prev; /* Turn off burst mode */ lpc_adc.cr = 0; @@ -119,7 +109,6 @@ void lpc_adc_isr(void) /* Store converted values in packet */ out = (uint16_t *) &ao_data_ring[ao_data_head].adc; - prev = ao_adc_prev; #if AO_ADC_0 sample(0); #endif -- 2.30.2