diff options
author | Nicolas Boichat <drinkcat@google.com> | 2016-11-15 09:28:13 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-11-17 07:08:25 -0800 |
commit | ff9c5dd0d281d9a4c86449f1a8c2f3db6a0a7217 (patch) | |
tree | 1e34cc960201eba1bf0fbe8d2e05aca8957613cf /include/keyboard_protocol.h | |
parent | dfc9b86c82204096e869678ad3b3b08dfa06ae6b (diff) | |
download | chrome-ec-ff9c5dd0d281d9a4c86449f1a8c2f3db6a0a7217.tar.gz |
keyboard: Always call keyboard_state_changed
8042 and USB HID keyboard will both use that function. Let's just
make it a no-op in the MKBP case.
BRANCH=none
BUG=chrome-os-partner:59083
TEST=make buildall -j
Change-Id: Iaee1bf2c6edff3db28f3db89fc292f9d1064483b
Reviewed-on: https://chromium-review.googlesource.com/411602
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include/keyboard_protocol.h')
-rw-r--r-- | include/keyboard_protocol.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/keyboard_protocol.h b/include/keyboard_protocol.h index 6fc0a06f7c..a8eafe308d 100644 --- a/include/keyboard_protocol.h +++ b/include/keyboard_protocol.h @@ -35,6 +35,18 @@ void keyboard_update_button(enum keyboard_button_type button, int is_pressed); #ifdef CONFIG_KEYBOARD_PROTOCOL_MKBP #include "keyboard_mkbp.h" + +/* MKBP protocol takes the whole keyboard matrix, and does not care about + * individual key presses. + */ +static inline void keyboard_state_changed(int row, int col, int is_pressed) {} +#else +/** + * Called by keyboard scan code once any key state change (after de-bounce), + * + * This function will look up matrix table and convert scancode host. + */ +void keyboard_state_changed(int row, int col, int is_pressed); #endif #endif /* __CROS_EC_KEYBOARD_PROTOCOL_H */ |