diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-12-26 21:37:50 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-12-26 21:37:50 +0000 |
commit | 88bccb641eccf8ca1a91ab0583976a211deb1ed5 (patch) | |
tree | 65f8b3f30035b51fd347b856ca80d55eead7d277 /nuttx/libc | |
parent | 8ed19bb07d00a15e2f2c9893d57b1ef1261b2d23 (diff) | |
download | px4-firmware-88bccb641eccf8ca1a91ab0583976a211deb1ed5.tar.gz px4-firmware-88bccb641eccf8ca1a91ab0583976a211deb1ed5.tar.bz2 px4-firmware-88bccb641eccf8ca1a91ab0583976a211deb1ed5.zip |
Verified USB HID KBD driver encoding of special characters; apps/examples/hidkbd now decodes encoded keyboar characters.
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5463 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/libc')
-rw-r--r-- | nuttx/libc/Kconfig | 28 | ||||
-rw-r--r-- | nuttx/libc/math/Kconfig | 2 | ||||
-rw-r--r-- | nuttx/libc/misc/Make.defs | 8 |
3 files changed, 36 insertions, 2 deletions
diff --git a/nuttx/libc/Kconfig b/nuttx/libc/Kconfig index bd470be7f..a5ff7fd43 100644 --- a/nuttx/libc/Kconfig +++ b/nuttx/libc/Kconfig @@ -3,6 +3,8 @@ # see misc/tools/kconfig-language.txt. # +comment "Standard C Library Options" + config STDIO_BUFFER_SIZE int "C STDIO buffer size" default 64 @@ -273,3 +275,29 @@ config ARCH_BZERO of bzero(). endif + +comment "Non-standard Helper Functions" + +config LIB_KBDCODEC + bool "Keyboard CODEC" + default y + ---help--- + In NuttX, a keyboard/keypad driver is simply a character driver that + may have an (optional) encoding/decoding layer on the data returned + by the character driver. A keyboard may return simple text data + (alphabetic, numeric, and punctuaction) or control characters + (enter, control-C, etc.). We can think about this the normal + "in-band" keyboard data stream. However, in addition, most + keyboards support actions that cannot be represented as text data. + Such actions include things like cursor controls (home, up arrow, + page down, etc.), editing functions (insert, delete, etc.), volume + controls, (mute, volume up, etc.) and other special functions. We + can think about this as special, "out-of-band" keyboard commands. + In this case, some special encoding may be required to multiplex + the in-band text data and out-of-band command streams. + + This option enables the functions that implement the encoding and + decoding of keyboard data. These are the interfaces prototyped in + include/nuttx/input/kbd_codec.h. While not correctly a part of + the C library, it is included here because the decoding side of this + interface must be accessible by end user programs. diff --git a/nuttx/libc/math/Kconfig b/nuttx/libc/math/Kconfig index c24bfd53f..db9dfae63 100644 --- a/nuttx/libc/math/Kconfig +++ b/nuttx/libc/math/Kconfig @@ -4,7 +4,7 @@ # config LIBM - bool "Math library" + bool "Standard Math library" default n depends on !ARCH_MATH_H ---help--- diff --git a/nuttx/libc/misc/Make.defs b/nuttx/libc/misc/Make.defs index c6af5f860..ad0313346 100644 --- a/nuttx/libc/misc/Make.defs +++ b/nuttx/libc/misc/Make.defs @@ -35,7 +35,7 @@ # Add the internal C files to the build -CSRCS += lib_init.c lib_filesem.c lib_kbdencode.c lib_kbddecode.c +CSRCS += lib_init.c lib_filesem.c # Add C files that depend on file OR socket descriptors @@ -63,6 +63,12 @@ CSRCS += lib_match.c CSRCS += lib_crc32.c CSRCS += lib_dbg.c lib_dumpbuffer.c +# Keyboard driver encoder/decoder + +ifneq ($(CONFIG_LIB_KBDCODEC),0) +CSRCS += lib_kbdencode.c lib_kbddecode.c +endif + # Add the misc directory to the build DEPPATH += --dep-path misc |