This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit ece6221edb972cf20322ce7e21fbad340d4ceb90 Author: Jorge Guzman <[email protected]> AuthorDate: Thu Jul 30 18:10:21 2026 -0300 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 <[email protected]> --- examples/hidkbd/Kconfig | 2 +- examples/hidkbd/hidkbd_main.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/hidkbd/Kconfig b/examples/hidkbd/Kconfig index c80d40943..8b938de37 100644 --- a/examples/hidkbd/Kconfig +++ b/examples/hidkbd/Kconfig @@ -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 diff --git a/examples/hidkbd/hidkbd_main.c b/examples/hidkbd/hidkbd_main.c index 1515d6526..d26082136 100644 --- a/examples/hidkbd/hidkbd_main.c +++ b/examples/hidkbd/hidkbd_main.c @@ -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
