summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-03-28 12:42:44 -0700
committerChromeBot <chrome-bot@google.com>2013-03-29 11:40:35 -0700
commit95a3a4107ae9c9013dbf3fb51ca3e98346cb82bb (patch)
tree5626015c33a2850cf6dc10a0194ab7dd20fa4d09 /include
parentfe3ccdf70a002e651bc1a13bcc305ae1e3422154 (diff)
downloadchrome-ec-95a3a4107ae9c9013dbf3fb51ca3e98346cb82bb.tar.gz
Merge i8042.c into keyboard_8042.c
This is in preparation for cleaning up the 8042 protocol stack and merging the typematic and i8042cmd tasks. No functionality change, just shuffling code and renaming functions. BUG=chrome-os-partner:18360 BRANCH=none TEST=boot link and type on its keyboard Change-Id: Iefc41cd5b8d18ac87830bff3080cfff92e9d10d2 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/46805 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/i8042.h47
-rw-r--r--include/keyboard_8042.h22
2 files changed, 5 insertions, 64 deletions
diff --git a/include/i8042.h b/include/i8042.h
deleted file mode 100644
index 6bca016b94..0000000000
--- a/include/i8042.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* 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.
- *
- * i8042 keyboard protocol
- */
-
-#ifndef __CROS_EC_I8042_H
-#define __CROS_EC_I8042_H
-
-#include "common.h"
-
-/**
- * Flush and reset all i8042 keyboard buffers.
- */
-void i8042_flush_buffer(void);
-
-/**
- * Notify the i8042 module when a byte is written by the host.
- *
- * Note: This is called in interrupt context by the LPC interrupt handler.
- *
- * @param data Byte written by host
- * @param is_cmd Is byte command (!=0) or data (0)
- */
-void i8042_receive(int data, int is_cmd);
-
-/**
- * Enable keyboard IRQ generation.
- *
- * @param enable Enable (!=0) or disable (0) IRQ generation.
- */
-void i8042_enable_keyboard_irq(int enable);
-
-/**
- * Send a scan code to the host.
- *
- * The EC lib will push the scan code bytes to host via port 0x60 and assert
- * the IBF flag to trigger an interrupt. The EC lib must queue them if the
- * host cannot read the previous byte away in time.
- *
- * @param len Number of bytes to send to the host
- * @param to_host Data to send
- */
-void i8042_send_to_host(int len, const uint8_t *to_host);
-
-#endif /* __CROS_EC_I8042_H */
diff --git a/include/keyboard_8042.h b/include/keyboard_8042.h
index 2dcd0367ee..a0d3389d11 100644
--- a/include/keyboard_8042.h
+++ b/include/keyboard_8042.h
@@ -10,22 +10,15 @@
#include "common.h"
-#define MAX_SCAN_CODE_LEN 4
-
/**
- * Handle the port 0x60 writes from host.
+ * Notify the keyboard module when a byte is written by the host.
*
- * This functions returns the number of bytes stored in *output buffer.
- */
-int handle_keyboard_data(uint8_t data, uint8_t *output);
-
-/**
- * Handle the port 0x64 writes from host.
+ * Note: This is called in interrupt context by the LPC interrupt handler.
*
- * This functions returns the number of bytes stored in *output buffer.
- * BUT theose bytes will appear at port 0x60.
+ * @param data Byte written by host
+ * @param is_cmd Is byte command (!=0) or data (0)
*/
-int handle_keyboard_command(uint8_t command, uint8_t *output);
+void keyboard_host_write(int data, int is_cmd);
/**
* Called by keyboard scan code once any key state change (after de-bounce),
@@ -39,9 +32,4 @@ void keyboard_state_changed(int row, int col, int is_pressed);
*/
void keyboard_set_power_button(int pressed);
-/**
- * Log the keyboard-related information
- */
-void kblog_put(char type, uint8_t byte);
-
#endif /* __CROS_EC_KEYBOARD_8042_H */