diff options
author | Scott Chao <scott_chao@wistron.corp-partner.google.com> | 2021-06-11 14:26:50 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-16 02:30:39 +0000 |
commit | 9f540598b57f5305e13b1f9cccad21bad0fb7f4e (patch) | |
tree | 982623d8edaad9c51e6e94740d110b01f1d2eac5 /board/primus/ps2.c | |
parent | dc08f0db223b2c2543168a5062047f515ea19daa (diff) | |
download | chrome-ec-9f540598b57f5305e13b1f9cccad21bad0fb7f4e.tar.gz |
primus: Enable PS/2 Mouse
BUG=b:187969783
BRANCH=none
TEST=make buildall
Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com>
Change-Id: I99a72393dbe732bcab51a02278b0c372239f895c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2952804
Reviewed-by: caveh jalali <caveh@chromium.org>
Reviewed-by: Boris Mittelberg <bmbm@google.com>
Diffstat (limited to 'board/primus/ps2.c')
-rw-r--r-- | board/primus/ps2.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/board/primus/ps2.c b/board/primus/ps2.c new file mode 100644 index 0000000000..2a605b37e5 --- /dev/null +++ b/board/primus/ps2.c @@ -0,0 +1,19 @@ +/* Copyright 2021 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. + */ + +#include "hooks.h" +#include "keyboard_8042.h" +#include "ps2_chip.h" + +void send_aux_data_to_device(uint8_t data) +{ + ps2_transmit_byte(NPCX_PS2_CH1, data); +} + +static void board_init(void) +{ + ps2_enable_channel(NPCX_PS2_CH1, 1, send_aux_data_to_host_interrupt); +} +DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); |