examples/adc: Fix g_adcstate.count initialization.

This commit is contained in:
Masayuki Ishikawa 2017-09-11 13:56:29 +09:00
parent 928443e385
commit 98fb74b82c

View File

@ -257,13 +257,14 @@ int adc_main(int argc, char *argv[])
adc_devpath(&g_adcstate, CONFIG_EXAMPLES_ADC_DEVPATH); adc_devpath(&g_adcstate, CONFIG_EXAMPLES_ADC_DEVPATH);
g_adcstate.initialized = true;
}
#if CONFIG_EXAMPLES_ADC_NSAMPLES > 0 #if CONFIG_EXAMPLES_ADC_NSAMPLES > 0
g_adcstate.count = CONFIG_EXAMPLES_ADC_NSAMPLES; g_adcstate.count = CONFIG_EXAMPLES_ADC_NSAMPLES;
#else #else
g_adcstate.count = 1; g_adcstate.count = 1;
#endif #endif
g_adcstate.initialized = true;
}
/* Parse the command line */ /* Parse the command line */