summaryrefslogtreecommitdiff
path: root/apps/examples
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-12-26 18:54:59 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-12-26 18:54:59 +0000
commitef1e66396e1872543fa7c30e1535eecad6725bcb (patch)
tree3a011d8111298655fe29cd6d1d7ea58308a87225 /apps/examples
parent81167b4592a18d9d80d1ed7795953addb71844c8 (diff)
downloadpx4-nuttx-ef1e66396e1872543fa7c30e1535eecad6725bcb.tar.gz
px4-nuttx-ef1e66396e1872543fa7c30e1535eecad6725bcb.tar.bz2
px4-nuttx-ef1e66396e1872543fa7c30e1535eecad6725bcb.zip
Implement encoding the usbhost HID keyboard driver; configre olimex-lpc1766stk HID keyboard configuration to use the kconfig-frontends tool
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5461 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples')
-rw-r--r--apps/examples/hidkbd/hidkbd_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/examples/hidkbd/hidkbd_main.c b/apps/examples/hidkbd/hidkbd_main.c
index e744a495c..bc1eebed0 100644
--- a/apps/examples/hidkbd/hidkbd_main.c
+++ b/apps/examples/hidkbd/hidkbd_main.c
@@ -206,7 +206,7 @@ int hidkbd_main(int argc, char *argv[])
printf("Device %s opened\n", CONFIG_EXAMPLES_HIDKBD_DEVNAME);
fflush(stdout);
- /* Loop until there is a read failure */
+ /* Loop until there is a read failure (or EOF?) */
do
{
@@ -220,7 +220,7 @@ int hidkbd_main(int argc, char *argv[])
(void)write(1, buffer, nbytes);
}
}
- while (nbytes >= 0);
+ while (nbytes > 0);
printf("Closing device %s: %d\n", CONFIG_EXAMPLES_HIDKBD_DEVNAME, (int)nbytes);
fflush(stdout);