From c04797a9f0a98fd09c6743c3d82aa65c469580e7 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 29 Sep 2011 17:49:36 +0000 Subject: Add debug instrumentation git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3998 42af7a65-404d-4744-a932-0658087f49c3 --- apps/examples/touchscreen/tc_main.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'apps/examples/touchscreen') 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; } -- cgit v1.2.3