diff options
Diffstat (limited to 'include/keyboard_scan.h')
-rw-r--r-- | include/keyboard_scan.h | 36 |
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 */ |