diff options
| author | Keith Packard <keithp@keithp.com> | 2013-06-17 14:52:32 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2013-06-17 14:52:32 -0700 | 
| commit | 025beb0fea011d0e3dab59b5d16e7ffae97c613c (patch) | |
| tree | b18f2a5d8f10a49128f88c482d6813778bb85dfe | |
| parent | 10f3d0084ff1c0b3dbf28c5d44727b514caeee20 (diff) | |
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 <keithp@keithp.com>
| -rw-r--r-- | src/lpc/ao_adc_lpc.c | 13 | 
1 files changed, 1 insertions, 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 | 
