diff options
author | David Hendricks <dhendrix@chromium.org> | 2012-05-16 10:08:51 -0700 |
---|---|---|
committer | David Hendricks <dhendrix@chromium.org> | 2012-05-16 16:53:59 -0700 |
commit | 546aeddc977cbbfc6fa2a041f6d1c94d7b5eb987 (patch) | |
tree | 3e6e9b8f22d1b47d544466e346bdc9cca7f50c00 /include/keyboard_scan.h | |
parent | b74cbd8a74d15bde904b99912df9663a58073bbb (diff) | |
download | chrome-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/keyboard_scan.h')
-rw-r--r-- | include/keyboard_scan.h | 3 |
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 */ |