mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
This test check correct scan code is sent when I8042_XLATE is enabled or disabled. BUG=chrome-os-partner:10286 TEST=Test passed Change-Id: I939963cbecddb22506e64cb374667c7c2e5b4f8b Reviewed-on: https://gerrit.chromium.org/gerrit/26096 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Ready: Vic Yang <victoryang@chromium.org> Tested-by: Vic Yang <victoryang@chromium.org>
30 lines
969 B
Python
30 lines
969 B
Python
# 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 scancode test
|
|
#
|
|
|
|
def test(helper):
|
|
# Wait for EC initialized
|
|
helper.wait_output("--- UART initialized")
|
|
|
|
# Disable typematic
|
|
helper.ec_command("typematic 1000000 1000000")
|
|
|
|
# Enable XLATE (Scan code set 1)
|
|
helper.ec_command("ctrlram 0 0x40")
|
|
helper.ec_command("mockmatrix 1 1 1")
|
|
helper.wait_output("i8042 SEND: 01") # make code
|
|
helper.ec_command("mockmatrix 1 1 0")
|
|
helper.wait_output("i8042 SEND: 81") # break code
|
|
|
|
# Disable XLATE (Scan code set 2)
|
|
helper.ec_command("ctrlram 0 0x00")
|
|
helper.ec_command("mockmatrix 1 1 1")
|
|
helper.wait_output("i8042 SEND: 76") # make code
|
|
helper.ec_command("mockmatrix 1 1 0")
|
|
helper.wait_output("i8042 SEND: f0 76") # break code
|
|
|
|
return True # PASS !
|