summaryrefslogtreecommitdiff
path: root/include/keyboard_8042_sharedlib.h
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2015-06-08 12:22:05 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-07-17 03:18:03 +0000
commit5400088ed3b615b0e336acdff58ce804fef432a8 (patch)
tree4d300599110bc74f761c8506ea70ae1cf4a1157b /include/keyboard_8042_sharedlib.h
parent214e8cacab495149fa7bdc1bf459c4615119336b (diff)
downloadchrome-ec-5400088ed3b615b0e336acdff58ce804fef432a8.tar.gz
libsharedobjs: Add 8042 scancodes to shared lib.
This commit adds the 8042 scancodes to the shared objects library saving 504 bytes from the RW image. To enable the space savings, define CONFIG_SHAREDLIB in the target's board.h file. BUG=none BRANCH=none TEST=make -j buildall tests TEST=Built samus EC image and verified keyboard still worked in RO and RW. TEST=Built samus EC image with CONFIG_SHAREDLIB enabled and verified that the keyboard still worked in RO and RW. TEST=Enabled CONFIG_SHAREDLIB for glados and cyan and watched build fail. CQ-DEPEND=CL:275344 Change-Id: I1241506c6b34d63e270677d4e8d0531a8a4236c9 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/276212 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'include/keyboard_8042_sharedlib.h')
-rw-r--r--include/keyboard_8042_sharedlib.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/keyboard_8042_sharedlib.h b/include/keyboard_8042_sharedlib.h
new file mode 100644
index 0000000000..054795e86d
--- /dev/null
+++ b/include/keyboard_8042_sharedlib.h
@@ -0,0 +1,28 @@
+/* Copyright 2015 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 __CROS_EC_KEYBOARD_8042_SHAREDLIB_H
+#define __CROS_EC_KEYBOARD_8042_SHAREDLIB_H
+
+#include "button.h"
+#include "keyboard_config.h"
+#include "keyboard_protocol.h"
+
+struct button_8042_t {
+ uint16_t scancode_set1;
+ uint16_t scancode_set2;
+ int repeat;
+};
+
+/* The standard Chrome OS keyboard matrix table. */
+extern const uint16_t scancode_set1[KEYBOARD_ROWS][KEYBOARD_COLS];
+extern const uint16_t scancode_set2[KEYBOARD_ROWS][KEYBOARD_COLS];
+
+/* Button scancodes (Power, Volume Down, Volume Up, etc.) */
+extern const struct button_8042_t buttons_8042[KEYBOARD_BUTTON_COUNT];
+
+#endif /* __CROS_EC_KEYBOARD_8042_SHAREDLIB_H */