summaryrefslogtreecommitdiff
path: root/apps/examples/touchscreen/tc_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/examples/touchscreen/tc_main.c')
-rw-r--r--apps/examples/touchscreen/tc_main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/examples/touchscreen/tc_main.c b/apps/examples/touchscreen/tc_main.c
index 0eb83ca4e..1c20712a3 100644
--- a/apps/examples/touchscreen/tc_main.c
+++ b/apps/examples/touchscreen/tc_main.c
@@ -118,6 +118,7 @@ int tc_main(int argc, char *argv[])
message("tc_main: nsamples: %d\n", CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES);
#endif
+#ifdef CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT
/* Initialization of the touchscreen hardware is performed by logic
* external to this test.
*/
@@ -130,6 +131,7 @@ int tc_main(int argc, char *argv[])
errval = 1;
goto errout;
}
+#endif
/* Open the touchscreen device for reading */
@@ -249,8 +251,12 @@ int tc_main(int argc, char *argv[])
errout_with_dev:
close(fd);
+
errout_with_tc:
+#ifdef CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT
arch_tcuninitialize();
+#endif
+
errout:
message("Terminating!\n");
msgflush();