summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-06-06 13:24:31 -0700
committerGerrit <chrome-bot@google.com>2012-06-07 09:59:55 -0700
commitb804daf6510c79fe3ce1de3f029ab4fe97c27152 (patch)
tree8658bcfb1278287587682afc6f6a586da6219652 /include
parentc736b2874c5144c752491c5bfe7025a91034767a (diff)
downloadchrome-ec-b804daf6510c79fe3ce1de3f029ab4fe97c27152.tar.gz
Misc keyboard module cleanup
Should be no functional changes; this is just rearranging code. BUG=none TEST=boot system and type on console; should still work Change-Id: I1c0d44db2d32048b1aaf458728b887b4a008c8cd Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/24644
Diffstat (limited to 'include')
-rw-r--r--include/keyboard.h52
1 files changed, 7 insertions, 45 deletions
diff --git a/include/keyboard.h b/include/keyboard.h
index 775135f1b7..8e218796a0 100644
--- a/include/keyboard.h
+++ b/include/keyboard.h
@@ -1,23 +1,17 @@
-/* Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+/* Copyright (c) 2012 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.
*
* The functions implemented by keyboard component of EC core.
*/
-#ifndef __INCLUDE_KEYBOARD_H
-#define __INCLUDE_KEYBOARD_H
+#ifndef __CROS_EC_KEYBOARD_H
+#define __CROS_EC_KEYBOARD_H
#include "common.h"
-/***************************************************************************/
-/* Functions exported by common/keyboard.c.
- */
-
#define MAX_SCAN_CODE_LEN 4
-#define MAX_KBLOG 512
-
/* Called by keyboard scan code once any key state change (after de-bounce),
*
* This function will look up matrix table and convert scancode host.
@@ -38,45 +32,13 @@ int handle_keyboard_data(uint8_t data, uint8_t *output);
*/
int handle_keyboard_command(uint8_t command, uint8_t *output);
+/* Clear the keyboard buffer to host. */
+void keyboard_clear_underlying_buffer(void);
-/* Send make/break code of power button to host.
- */
+/* Send make/break code of power button to host. */
void keyboard_set_power_button(int pressed);
-
/* Log the keyboard-related information */
void kblog_put(char type, uint8_t byte);
-/***************************************************************************/
-/* Below is the interface with the underlying chip-dependent code.
- */
-#define MAX_KEYBOARD_MATRIX_ROWS 8
-#define MAX_KEYBOARD_MATRIX_COLS 16
-
-/* Clear the keyboard buffer to host. */
-void keyboard_clear_underlying_buffer(void);
-
-/* Asks the underlayer EC lib what keys are pressed right now.
- *
- * Sets bit_array to a debounced array of which keys are currently pressed,
- * where a 1-bit means the key is pressed. For example, if only row=2 col=3
- * is pressed, it would set bit_array to {0, 0, 0x08, 0, ...}
- *
- * bit_array must be at least MAX_KEYBOARD_MATRIX_COLS bytes long.
- */
-enum ec_error_list keyboard_get_state(uint8_t *bit_array);
-
-/* Returns true if the to-host-buffer is non-empty. */
-int keyboard_has_char(void);
-
-/* Sends a char to host and triggers IRQ if specified. */
-void keyboard_put_char(uint8_t chr, int send_irq);
-
-/* Clears the keyboard buffer to host. */
-void keyboard_clear_buffer(void);
-
-/* Host just resumes the interrupt. Sends an interrupt if buffer is non-empty.
- */
-void keyboard_resume_interrupt(void);
-
-#endif /* __INCLUDE_KEYBOARD_H */
+#endif /* __CROS_EC_KEYBOARD_H */