diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-12-26 18:54:59 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-12-26 18:54:59 +0000 |
commit | 373e145e546cc34b6a0000d7b3f71538c05a3b1b (patch) | |
tree | 3a011d8111298655fe29cd6d1d7ea58308a87225 /nuttx/libc | |
parent | 292d4db37a4080585577c43434157db335cd5158 (diff) | |
download | px4-firmware-373e145e546cc34b6a0000d7b3f71538c05a3b1b.tar.gz px4-firmware-373e145e546cc34b6a0000d7b3f71538c05a3b1b.tar.bz2 px4-firmware-373e145e546cc34b6a0000d7b3f71538c05a3b1b.zip |
Implement encoding the usbhost HID keyboard driver; configre olimex-lpc1766stk HID keyboard configuration to use the kconfig-frontends tool
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5461 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/libc')
-rw-r--r-- | nuttx/libc/misc/lib_kbddecode.c | 10 | ||||
-rw-r--r-- | nuttx/libc/misc/lib_kbdencode.c | 3 |
2 files changed, 9 insertions, 4 deletions
diff --git a/nuttx/libc/misc/lib_kbddecode.c b/nuttx/libc/misc/lib_kbddecode.c index 046d570f9..cb57b5215 100644 --- a/nuttx/libc/misc/lib_kbddecode.c +++ b/nuttx/libc/misc/lib_kbddecode.c @@ -89,7 +89,7 @@ * ****************************************************************************/ -static int kbd_reget(FAR struct kget_getstate_s *state, FAR uint8_t *pch) +static int kbd_reget(FAR struct kbd_getstate_s *state, FAR uint8_t *pch) { /* Return the next character */ @@ -107,7 +107,7 @@ static int kbd_reget(FAR struct kget_getstate_s *state, FAR uint8_t *pch) * Name: kbd_get * * Description: - * Put one byte of data or special command from the driver provided input + * Get one byte of data or special command from the driver provided input * buffer. * * Input Parameters: @@ -120,15 +120,17 @@ static int kbd_reget(FAR struct kget_getstate_s *state, FAR uint8_t *pch) * should be cleared the first time that kbd_get is called. * * Returned Value: - * 1 - Indicates the successful receipt of a special, "out-of-band" command + * 1 - Indicates the successful receipt of a special, "out-of-band" command. + * The returned value in pch is a value from enum kbd_getstate_s. * 0 - Indicates the successful receipt of normal, "in-band" ASCII data. + * The returned value in pch is a simple byte of text or control data. * EOF - An error has getting the next character (reported by the stream). * Normally indicates the end of file. * ****************************************************************************/ int kbd_get(FAR struct lib_instream_s *stream, - FAR struct kget_getstate_s *state, FAR uint8_t *pch) + FAR struct kbd_getstate_s *state, FAR uint8_t *pch) { int ch; diff --git a/nuttx/libc/misc/lib_kbdencode.c b/nuttx/libc/misc/lib_kbdencode.c index 80bf14777..40a8805b1 100644 --- a/nuttx/libc/misc/lib_kbdencode.c +++ b/nuttx/libc/misc/lib_kbdencode.c @@ -62,6 +62,9 @@ * Put one special, "out-of-band" command into the output stream. * * Input Parameters: + * keycode - The command to be added to the output stream. + * stream - An instance of lib_outstream_s to do the low-level put + * operation. * * Returned Value: * None |