From 7bdd1519eab1e0e79cbd84c941d4db6ecb7a8bae Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 30 Sep 2011 17:28:22 +0000 Subject: 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 --- apps/examples/touchscreen/tc_main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'apps/examples/touchscreen') diff --git a/apps/examples/touchscreen/tc_main.c b/apps/examples/touchscreen/tc_main.c index 00e1fbab0..2d8fca033 100644 --- a/apps/examples/touchscreen/tc_main.c +++ b/apps/examples/touchscreen/tc_main.c @@ -42,6 +42,7 @@ #include #include +#include #include #include #include @@ -106,12 +107,15 @@ int MAIN_NAME(int argc, char *argv[]) * samples that we collect before returning. Otherwise, we never return */ -#ifdef CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN +#if defined(CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN) nsamples = 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 /* Initialization of the touchscreen hardware is performed by logic -- cgit v1.2.3