summaryrefslogtreecommitdiff
path: root/include/keyboard_scan.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-03-19 13:11:17 -0700
committerChromeBot <chrome-bot@google.com>2013-03-19 14:59:32 -0700
commit24f0d888dd8110f7f0448b9dbeb47c13f5b1e298 (patch)
treec981f177484f8c80cb37b5c2798178d5449b01a8 /include/keyboard_scan.h
parenta3c2a73226dd558d4c9f0b5827b7db946885f395 (diff)
downloadchrome-ec-24f0d888dd8110f7f0448b9dbeb47c13f5b1e298.tar.gz
Use common declaration of keyboard_scan_interrupt()
Code cleanup: declare keyboard_scan_interrupt() once, not per board; the implementation is common anyway. No functional changes; just renaming. BUG=none BRANCH=none TEST=build daisy,snow,spring,mccrosskey Change-Id: I1e33cbe2c868bc47b641d36d26f07c3b5a7ba3c7 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/45874 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'include/keyboard_scan.h')
-rw-r--r--include/keyboard_scan.h36
1 files changed, 29 insertions, 7 deletions
diff --git a/include/keyboard_scan.h b/include/keyboard_scan.h
index 8bdbd6905c..54e7259c21 100644
--- a/include/keyboard_scan.h
+++ b/include/keyboard_scan.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -9,8 +9,11 @@
#define __CROS_EC_KEYBOARD_SCAN_H
#include "common.h"
+#include "gpio.h"
-/* Initializes the module. */
+/**
+ * Initializes the module.
+ */
void keyboard_scan_init(void);
/* Key held down at keyboard-controlled reset boot time. */
@@ -21,7 +24,7 @@ enum boot_key {
BOOT_KEY_OTHER = -1, /* None of the above */
};
-/*
+/**
* Return the key held down at boot time in addition to the keyboard-controlled
* reset keys. Returns BOOT_KEY_OTHER if none of the keys specifically checked
* was pressed, or reset was not caused by a keyboard-controlled reset, or if
@@ -29,16 +32,35 @@ enum boot_key {
*/
enum boot_key keyboard_scan_get_boot_key(void);
-/* Return non-zero if recovery key was pressed at boot. */
+/**
+ * Return non-zero if recovery key was pressed at boot.
+ */
int keyboard_scan_recovery_pressed(void);
-/* Clear any saved keyboard state (empty FIFO, etc) */
+/**
+ * Clear any saved keyboard state (empty FIFO, etc).
+ */
void keyboard_clear_state(void);
-/* Enables/disables keyboard matrix scan. */
+/**
+ * Enables/disables keyboard matrix scan.
+ */
void keyboard_enable_scanning(int enable);
-/* Sends KEY_BATTERY keystroke */
+/**
+ * Sends KEY_BATTERY keystroke.
+ */
void keyboard_send_battery_key(void);
+#ifdef CONFIG_TASK_KEYSCAN
+
+/**
+ * Keyboard scan GPIO interrupt.
+ */
+void keyboard_scan_interrupt(enum gpio_signal signal);
+
+#else
+#define keyboard_scan_interrupt NULL
+#endif
+
#endif /* __CROS_EC_KEYBOARD_SCAN_H */