diff --git a/examples/adc/adc_main.c b/examples/adc/adc_main.c index 38d5d3fb1..37d6c7777 100644 --- a/examples/adc/adc_main.c +++ b/examples/adc/adc_main.c @@ -257,14 +257,15 @@ int adc_main(int argc, char *argv[]) adc_devpath(&g_adcstate, CONFIG_EXAMPLES_ADC_DEVPATH); -#if CONFIG_EXAMPLES_ADC_NSAMPLES > 0 - g_adcstate.count = CONFIG_EXAMPLES_ADC_NSAMPLES; -#else - g_adcstate.count = 1; -#endif g_adcstate.initialized = true; } +#if CONFIG_EXAMPLES_ADC_NSAMPLES > 0 + g_adcstate.count = CONFIG_EXAMPLES_ADC_NSAMPLES; +#else + g_adcstate.count = 1; +#endif + /* Parse the command line */ #ifdef CONFIG_NSH_BUILTIN_APPS