summaryrefslogtreecommitdiff
path: root/include/keyboard_protocol.h
diff options
context:
space:
mode:
authorChromeOS Developer <dparker@chromium.org>2014-01-10 14:15:34 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-02-07 04:13:14 +0000
commit4015172ed1b8a93350e433deb3399693ff4e00ed (patch)
tree866a15514a901fc2e0d8a0ee90609d11bba97932 /include/keyboard_protocol.h
parent798df2a6d077cb973cb60c5401d0ec037006fe9a (diff)
downloadchrome-ec-4015172ed1b8a93350e433deb3399693ff4e00ed.tar.gz
8042: Add interface for handling off-matrix button changes
BUG=chrome-os-partner:24370 BRANCH=tot TEST=Power key and keyboard work normally. Signed-off-by: Dave Parker <dparker@chromium.org> Orig-Change-Id: I291ff384ae2fc3e074132330713f0b0c2cc36a76 Reviewed-on: https://chromium-review.googlesource.com/184543 (cherry picked from commit c65f82a5b02cdecf5b62f71ef2e916795f808389) Change-Id: I1cd02e824c97eb5909e7bff68c8ecefc89f52df0 Reviewed-on: https://chromium-review.googlesource.com/185242 Tested-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Queue: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/keyboard_protocol.h')
-rw-r--r--include/keyboard_protocol.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/keyboard_protocol.h b/include/keyboard_protocol.h
index 866c58807b..6fc0a06f7c 100644
--- a/include/keyboard_protocol.h
+++ b/include/keyboard_protocol.h
@@ -9,6 +9,7 @@
#define __CROS_EC_KEYBOARD_PROTOCOL_H
#include "common.h"
+#include "button.h"
/* Routines common to all protocols */
@@ -17,6 +18,15 @@
*/
void keyboard_clear_buffer(void);
+/*
+ * Respond to button changes. Implemented by a host-specific
+ * handler.
+ *
+ * @param button The button that changed.
+ * @param is_pressed Whether the button is now pressed.
+ */
+void keyboard_update_button(enum keyboard_button_type button, int is_pressed);
+
/* Protocol-specific includes */
#ifdef CONFIG_KEYBOARD_PROTOCOL_8042