summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2022-08-15 15:56:10 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-08-18 14:47:22 +0000
commit08d69143b21125f717d7e695481f28ecdfc6d559 (patch)
tree144160d8efbd0b22190b6f0a4cc63eeb2db3bda5 /test
parent5af88437a4f126c37224f5b3a4c001d14c091d3e (diff)
downloadchrome-ec-08d69143b21125f717d7e695481f28ecdfc6d559.tar.gz
8042: Rename I8042_CMD to ATKBD_CMD and move to a different file
These are actually AT Keyboard commands, and not specific to the i8042 controller. Using the correct prefix will make it easier to understand which device we are interacting with. I also moved the definitions into a different file to make it clear that there is a separation between the two protocols. BUG=b:242886255 BRANCH=none TEST=build guybrush Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: I160f1d71edbce80606d8bcb01dbeb0d2192cfa93 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3835508 Code-Coverage: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Yuval Peress <peress@google.com> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/kb_8042.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/kb_8042.c b/test/kb_8042.c
index 1a3681aa28..7f1f2b388f 100644
--- a/test/kb_8042.c
+++ b/test/kb_8042.c
@@ -5,6 +5,7 @@
* Tests for keyboard MKBP protocol
*/
+#include "atkbd_protocol.h"
#include "common.h"
#include "console.h"
#include "ec_commands.h"
@@ -50,20 +51,20 @@ static void press_key(int c, int r, int pressed)
static void enable_keystroke(int enabled)
{
- uint8_t data = enabled ? I8042_CMD_ENABLE : I8042_CMD_RESET_DIS;
+ uint8_t data = enabled ? ATKBD_CMD_ENABLE : ATKBD_CMD_RESET_DIS;
keyboard_host_write(data, 0);
msleep(30);
}
static void reset_8042(void)
{
- keyboard_host_write(I8042_CMD_RESET_DEF, 0);
+ keyboard_host_write(ATKBD_CMD_RESET_DEF, 0);
msleep(30);
}
static void set_typematic(uint8_t val)
{
- keyboard_host_write(I8042_CMD_SETREP, 0);
+ keyboard_host_write(ATKBD_CMD_SETREP, 0);
msleep(30);
keyboard_host_write(val, 0);
msleep(30);
@@ -71,7 +72,7 @@ static void set_typematic(uint8_t val)
static void set_scancode(uint8_t s)
{
- keyboard_host_write(I8042_CMD_SSCANSET, 0);
+ keyboard_host_write(ATKBD_CMD_SSCANSET, 0);
msleep(30);
keyboard_host_write(s, 0);
msleep(30);