summaryrefslogtreecommitdiff
path: root/chip
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2013-07-08 09:54:36 +0800
committerChromeBot <chrome-bot@google.com>2013-07-11 22:32:52 -0700
commit2475cce9ad0e505a45562189e5427683d4ebd65c (patch)
tree1110f516e9d50900ce1cb4492f2743f1639cd8e2 /chip
parentb2bc8aaa20479a87261aed8611367f11cf33c909 (diff)
downloadchrome-ec-2475cce9ad0e505a45562189e5427683d4ebd65c.tar.gz
Add I8042 keyboard unit test
This tests I8042 scancode and typematic. BUG=chrome-os-partner:19236 TEST=Pass all tests many times. BRANCH=None Change-Id: I8457b7b807b694b0bae32abf1647961f946dc5e1 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/61553 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r--chip/host/build.mk2
-rw-r--r--chip/host/lpc.c33
2 files changed, 34 insertions, 1 deletions
diff --git a/chip/host/build.mk b/chip/host/build.mk
index 866c84da20..10630914ce 100644
--- a/chip/host/build.mk
+++ b/chip/host/build.mk
@@ -8,5 +8,5 @@
CORE:=host
-chip-y=system.o gpio.o uart.o persistence.o flash.o
+chip-y=system.o gpio.o uart.o persistence.o flash.o lpc.o
chip-$(HAS_TASK_KEYSCAN)+=keyboard_raw.o
diff --git a/chip/host/lpc.c b/chip/host/lpc.c
new file mode 100644
index 0000000000..86921bd4e7
--- /dev/null
+++ b/chip/host/lpc.c
@@ -0,0 +1,33 @@
+/* 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.
+ */
+
+/* LPC module for Chrome EC emulator */
+
+#include "lpc.h"
+
+test_mockable int lpc_keyboard_has_char(void)
+{
+ return 0;
+}
+
+test_mockable int lpc_keyboard_input_pending(void)
+{
+ return 0;
+}
+
+test_mockable void lpc_keyboard_put_char(uint8_t chr, int send_irq)
+{
+ /* Do nothing */
+}
+
+test_mockable void lpc_keyboard_clear_buffer(void)
+{
+ /* Do nothing */
+}
+
+test_mockable void lpc_keyboard_resume_irq(void)
+{
+ /* Do nothing */
+}