summaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-12-26 18:54:59 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-12-26 18:54:59 +0000
commitef1e66396e1872543fa7c30e1535eecad6725bcb (patch)
tree3a011d8111298655fe29cd6d1d7ea58308a87225 /nuttx/include
parent81167b4592a18d9d80d1ed7795953addb71844c8 (diff)
downloadpx4-nuttx-ef1e66396e1872543fa7c30e1535eecad6725bcb.tar.gz
px4-nuttx-ef1e66396e1872543fa7c30e1535eecad6725bcb.tar.bz2
px4-nuttx-ef1e66396e1872543fa7c30e1535eecad6725bcb.zip
Implement encoding the usbhost HID keyboard driver; configre olimex-lpc1766stk HID keyboard configuration to use the kconfig-frontends tool
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5461 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/nuttx/input/kbd_codec.h26
1 files changed, 16 insertions, 10 deletions
diff --git a/nuttx/include/nuttx/input/kbd_codec.h b/nuttx/include/nuttx/input/kbd_codec.h
index b103d544e..d374ed8d3 100644
--- a/nuttx/include/nuttx/input/kbd_codec.h
+++ b/nuttx/include/nuttx/input/kbd_codec.h
@@ -113,7 +113,7 @@ enum kbd_keycode_e
KEYCODE_PAUSE, /* Pause */
KEYCODE_BREAK, /* Break */
KEYCODE_CANCEL, /* Cancel */
- KEYCODE_PRINTSCN, /* PrintScreen */
+ KEYCODE_PRTSCRN, /* PrintScreen */
KEYCODE_SYSREQ, /* SysReq/Attention */
/* Audio */
@@ -131,14 +131,15 @@ enum kbd_keycode_e
KEYCODE_CLEAR, /* Clear */
KEYCODE_CLEARENTRY, /* Clear entry */
+ KEYCODE_NEGATE, /* +/- */
- KEYCODE_MEMSET, /* Memory set */
+ KEYCODE_MEMSTORE, /* Memory store */
KEYCODE_MEMCLEAR, /* Memory clear */
KEYCODE_MEMRECALL, /* Memory recall */
KEYCODE_MEMADD, /* Memory add */
- KEYCODE_MEMSUBTRACT, /* Memory substract */
- KEYCODE_MEMMULTIPY, /* Memory multiply */
- KEYCODE_MEMDIVIDE, /* Memory divide */
+ KEYCODE_MEMSUB, /* Memory substract */
+ KEYCODE_MEMMUL, /* Memory multiply */
+ KEYCODE_MEMDIV, /* Memory divide */
KEYCODE_BINARY, /* Binary mode */
KEYCODE_OCTAL, /* Octal mode */
@@ -197,7 +198,7 @@ enum kbd_keycode_e
* Public Types
****************************************************************************/
-struct kget_getstate_s
+struct kbd_getstate_s
{
uint8_t nch; /* Number of characters in the buffer */
uint8_t ndx; /* Index to next character in the buffer */
@@ -225,7 +226,7 @@ extern "C"
* Put one byte of normal, "in-band" ASCII data into the output stream.
*
* Input Parameters:
- * ch - The character to be into the output stream.
+ * ch - The character to be added to the output stream.
* stream - An instance of lib_outstream_s to do the low-level put
* operation.
*
@@ -243,6 +244,9 @@ extern "C"
* 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
@@ -261,7 +265,7 @@ void kbd_putspecial(enum kbd_keycode_e keycode,
* 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:
@@ -274,15 +278,17 @@ void kbd_putspecial(enum kbd_keycode_e keycode,
* 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);
#ifdef __cplusplus
}