summaryrefslogtreecommitdiff
path: root/include/keyboard_scan.h
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2017-01-04 09:36:12 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-05-03 19:40:24 -0700
commit4444702e858a8fa3d51c948f509450e136a9482a (patch)
tree196329247f4cdcc8f6c80cd899e539978ba2a6d4 /include/keyboard_scan.h
parent993e6f24fa201e135670457b8c3affe356c951f2 (diff)
downloadchrome-ec-4444702e858a8fa3d51c948f509450e136a9482a.tar.gz
keyboard: Clear typematic when disabling keyboard
This patch clears the typematic buffer when disabling keyboard scan. When the device goes to tablet mode with a key being pressed, this should prevent keyboard_protocol_task from sending scan codes to the host. BUG=b:35585725 BRANCH=none TEST=make buildall. Tested on Electro. Change-Id: I73e9d2948b472458814967307412aebeb410ff2e Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/425075 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'include/keyboard_scan.h')
-rw-r--r--include/keyboard_scan.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/keyboard_scan.h b/include/keyboard_scan.h
index faba74ffe1..94457dd16d 100644
--- a/include/keyboard_scan.h
+++ b/include/keyboard_scan.h
@@ -98,6 +98,11 @@ enum kb_scan_disable_masks {
* @param mask Disable reasons from kb_scan_disable_masks
*/
void keyboard_scan_enable(int enable, enum kb_scan_disable_masks mask);
+
+/**
+ * Clears typematic key
+ */
+void clear_typematic_key(void);
#else
static inline void keyboard_scan_enable(int enable,
enum kb_scan_disable_masks mask) { }