altos/lpc: adc code computes number of active ADC channels
authorKeith Packard <keithp@keithp.com>
Wed, 21 May 2014 08:39:01 +0000 (01:39 -0700)
committerKeith Packard <keithp@keithp.com>
Wed, 21 May 2014 08:43:12 +0000 (01:43 -0700)
Don't require the application to provide AO_NUM_ADC when AO_ADC_NUM is
computed automatically.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/lpc/ao_adc_lpc.c

index e1aae0e484d5c726910185e5c15907c41a5932f6..b24163eeb9daa3b91bdfad259879f8de81c249a7 100644 (file)
@@ -160,7 +160,7 @@ ao_adc_dump(void) __reentrant
 #else
        printf("tick: %5u",  packet.tick);
        d = (int16_t *) (&packet.adc);
-       for (i = 0; i < AO_NUM_ADC; i++)
+       for (i = 0; i < AO_ADC_NUM; i++)
                printf (" %2d: %5d", i, d[i]);
        printf("\n");
 #endif