Add debug instrumentation

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3998 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2011-09-29 17:49:36 +00:00
parent d62ad86fbd
commit d59e1ae7ac

View File

@ -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;
}