summaryrefslogtreecommitdiff
path: root/apps/examples/touchscreen
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-09-29 17:49:36 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-09-29 17:49:36 +0000
commitc04797a9f0a98fd09c6743c3d82aa65c469580e7 (patch)
tree510583291550aca0cb2912815b7811dfd4aa28e7 /apps/examples/touchscreen
parentb426f9cf6704fa666ca94d8e67a873d2df0d5298 (diff)
downloadnuttx-c04797a9f0a98fd09c6743c3d82aa65c469580e7.tar.gz
nuttx-c04797a9f0a98fd09c6743c3d82aa65c469580e7.tar.bz2
nuttx-c04797a9f0a98fd09c6743c3d82aa65c469580e7.zip
Add debug instrumentation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3998 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples/touchscreen')
-rw-r--r--apps/examples/touchscreen/tc_main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/examples/touchscreen/tc_main.c b/apps/examples/touchscreen/tc_main.c
index 291abcb8f..53e7b1291 100644
--- a/apps/examples/touchscreen/tc_main.c
+++ b/apps/examples/touchscreen/tc_main.c
@@ -150,9 +150,16 @@ int MAIN_NAME(int argc, char *argv[])
for (;;)
#endif
{
+ /* Flush any output before the loop entered or from the previous pass
+ * through the loop.
+ */
+
+ msgflush();
+
/* Read one sample */
nbytes = read(fd, &sample, sizeof(struct touch_sample_s));
+ ivdbg("Bytes read: %d\n", nbytes);
/* Handle unexpected return values */
@@ -197,5 +204,7 @@ errout_with_dev:
errout_with_tc:
arch_tcuninitialize();
errout:
+ message("Terminating!\n");
+ msgflush();
return errval;
}