Merged in masayuki2009/nuttx.apps/lc823450 (pull request #105)

examples/adc: Fix g_adcstate.count initialization.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
Masayuki Ishikawa 2017-09-11 13:15:12 +00:00 committed by Gregory Nutt
commit fcf26f6bd7

View File

@ -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