mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-23 13:38:41 +00:00
examples/hidkbd: follow the byte stream option rename
The example gated its decoding on HIDKBD_ENCODED, which no longer exists: the USB HID keyboard driver reports through the keyboard upper half now, and what produces the byte stream is INPUT_KEYBOARD_BYTESTREAM. Left as it was, the option could never be satisfied and the example would quietly stop decoding special keys. Reaching the option again brings hidkbd_decode() back into the build after a spell of being unreachable, and it uses isprint() without including ctype.h. That is an error rather than a warning under the -Werror the CI builds with, in the nine configurations that enable EXAMPLES_HIDKBD, so add the include here rather than in a later commit. Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
This commit is contained in:
parent
b8a7b2cc9b
commit
b0a472154f
2 changed files with 5 additions and 2 deletions
|
|
@ -36,7 +36,7 @@ config EXAMPLES_HIDKBD_DEVNAME
|
|||
config EXAMPLES_HIDKBD_ENCODED
|
||||
bool "Encode Special Keys"
|
||||
default y
|
||||
depends on HIDKBD_ENCODED && LIBC_KBDCODEC
|
||||
depends on INPUT_KEYBOARD_BYTESTREAM
|
||||
---help---
|
||||
Decode special key press events in the user buffer. In this case,
|
||||
the example coded will use the interfaces defined in
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@
|
|||
#include <nuttx/usb/usbhost.h>
|
||||
|
||||
#ifdef CONFIG_EXAMPLES_HIDKBD_ENCODED
|
||||
# include <ctype.h>
|
||||
|
||||
# include <nuttx/streams.h>
|
||||
# include <nuttx/input/kbd_codec.h>
|
||||
#endif
|
||||
|
|
@ -55,7 +57,8 @@
|
|||
# define CONFIG_EXAMPLES_HIDKBD_DEVNAME "/dev/kbda"
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_HIDKBD_ENCODED) || !defined(CONFIG_LIBC_KBDCODEC)
|
||||
#if !defined(CONFIG_INPUT_KEYBOARD_BYTESTREAM) || \
|
||||
!defined(CONFIG_LIBC_KBDCODEC)
|
||||
# undef CONFIG_EXAMPLES_HIDKBD_ENCODED
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue