mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-17 18:28:31 +00:00
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
1 changed files with 6 additions and 5 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue