diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-12-28 23:40:54 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-12-28 23:40:54 +0000 |
commit | dfbc56054f377761c50a1a7453ed00a228fa9766 (patch) | |
tree | 98593e250fbbfe7f154c8b4edd7a91aa7f43185b /apps/examples/hidkbd | |
parent | 37e2da3332de942dfb728e7ee8f50cd31c9a2676 (diff) | |
download | px4-nuttx-dfbc56054f377761c50a1a7453ed00a228fa9766.tar.gz px4-nuttx-dfbc56054f377761c50a1a7453ed00a228fa9766.tar.bz2 px4-nuttx-dfbc56054f377761c50a1a7453ed00a228fa9766.zip |
Add board support at configs/zp214xpa for the The0.net ZP213X/4XPA board with the LPC2148; Add configurations sim/nxlines. convert mcu123-lpc214x/nsh to use the kconfig-frontends.
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5465 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples/hidkbd')
-rw-r--r-- | apps/examples/hidkbd/hidkbd_main.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/examples/hidkbd/hidkbd_main.c b/apps/examples/hidkbd/hidkbd_main.c index d7e79b121..abc942a44 100644 --- a/apps/examples/hidkbd/hidkbd_main.c +++ b/apps/examples/hidkbd/hidkbd_main.c @@ -177,12 +177,14 @@ static void hidkbd_decode(FAR char *buffer, ssize_t nbytes) /* Decode the next thing from the buffer */ ret = kbd_decode((FAR struct lib_instream_s *)&kbdstream, &state, &ch); - if (ret == KBD_ERROR) + if (ret == KBD_ERROR) /* Error or end-of-file */ { + /* Break out when all of the data has been processed */ + break; } - /* Normal data? Or special key? */ + /* Normal data? Or special key? Press? Or release? */ switch (ret) { @@ -202,10 +204,7 @@ static void hidkbd_decode(FAR char *buffer, ssize_t nbytes) printf("Special Release: %d\n", ch); break; - case KBD_ERROR: /* Error or end-of-file */ - printf("EOF: %d\n", ret); - break; - + case KBD_ERROR: /* Error or end-of-file, already handled */ default: printf("Unexpected: %d\n", ret); break; |