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:
commit
fcf26f6bd7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user