Fix an error when the touchscreen test is run as an NSH built-in
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4002 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
421d81c6cd
commit
d174e457ab
@ -42,6 +42,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -106,12 +107,15 @@ int MAIN_NAME(int argc, char *argv[])
|
|||||||
* samples that we collect before returning. Otherwise, we never return
|
* samples that we collect before returning. Otherwise, we never return
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN
|
#if defined(CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN)
|
||||||
nsamples = 1;
|
nsamples = 1;
|
||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
{
|
{
|
||||||
nsamples = strtol(argv[1]);
|
nsamples = strtol(argv[1], NULL, 10);
|
||||||
}
|
}
|
||||||
|
message(MAIN_STRING "nsamples: %d\n", nsamples);
|
||||||
|
#elif defined(CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES)
|
||||||
|
message(MAIN_STRING "nsamples: %d\n", CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialization of the touchscreen hardware is performed by logic
|
/* Initialization of the touchscreen hardware is performed by logic
|
||||||
|
Loading…
x
Reference in New Issue
Block a user