summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Hendricks <dhendrix@chromium.org>2012-05-16 10:08:51 -0700
committerDavid Hendricks <dhendrix@chromium.org>2012-05-16 16:53:59 -0700
commit546aeddc977cbbfc6fa2a041f6d1c94d7b5eb987 (patch)
tree3e6e9b8f22d1b47d544466e346bdc9cca7f50c00 /include
parentb74cbd8a74d15bde904b99912df9663a58073bbb (diff)
downloadchrome-ec-546aeddc977cbbfc6fa2a041f6d1c94d7b5eb987.tar.gz
stm32: add a FIFO for keyboard usage
This CL adds a simple FIFO to store keystrokes. The keyboard_scan() function will push keystrokes into the FIFO and is the only producer, while keyboard_get_scan() will pop entries and is the only consumer. BUG=chrome-os-partner:9594 TEST=tested on daisy Signed-off-by: David Hendricks <dhendrix@chromium.org> Testing was mostly subjectively done by typing a sentence quickly at the Chrome UI. Change-Id: I6faff41b0f16b75d6426df13a239f84eb62634ec
Diffstat (limited to 'include')
-rw-r--r--include/keyboard_scan.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/keyboard_scan.h b/include/keyboard_scan.h
index 6ba01f9d0e..895fdfd2b8 100644
--- a/include/keyboard_scan.h
+++ b/include/keyboard_scan.h
@@ -31,4 +31,7 @@ int keyboard_scan_recovery_pressed(void);
*/
int keyboard_get_scan(uint8_t **buffp, int max_bytes);
+/* clear any saved keyboard state (empty FIFO, etc) */
+void keyboard_clear_state(void);
+
#endif /* __CROS_KEYBOARD_SCAN_H */