From 4a4ff0d3aeb66c858d5ea5417e627ca6496658d5 Mon Sep 17 00:00:00 2001 From: tracer-ysyx Date: Wed, 10 Jan 2024 17:27:21 +0800 Subject: [PATCH] =?UTF-8?q?>=20build=5Fnpc=5FVKeyboard=5Fnvboard=20=20ysyx?= =?UTF-8?q?=5F22040000=20=E6=9D=8E=E5=BF=83=E6=9D=A8=20=20Linux=20calcite?= =?UTF-8?q?=206.1.69=20#1-NixOS=20SMP=20PREEMPT=5FDYNAMIC=20Wed=20Dec=2020?= =?UTF-8?q?=2016:00:29=20UTC=202023=20x86=5F64=20GNU/Linux=20=20=2017:27:2?= =?UTF-8?q?1=20=20up=202=20days=2016:28,=20=202=20users,=20=20load=20avera?= =?UTF-8?q?ge:=200.54,=200.76,=200.75?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- npc/csrc_nvboard/Keyboard/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/npc/csrc_nvboard/Keyboard/main.cpp b/npc/csrc_nvboard/Keyboard/main.cpp index d2f2a28..0218bd1 100644 --- a/npc/csrc_nvboard/Keyboard/main.cpp +++ b/npc/csrc_nvboard/Keyboard/main.cpp @@ -10,8 +10,9 @@ #define CLASS_SYSTEM_HEADER_NAME(name) CLASS_SYSTEM_HEADER_NAME_IMPL(name) #define CLASS_SYSTEM_HEADER_NAME_IMPL(name) - #include CLASS_SYSTEM_HEADER_NAME(VERILATOR_TOPMODULE) +#undef CLASS_SYSTEM_HEADER_NAME +#undef CLASS_SYSTEM_HEADER_NAME_IMPL const int MAX_SIM_TIME = 100; int keycode = 0; @@ -49,8 +50,8 @@ int main(int argc, char **argv, char **env) { while (true) { nvboard_update(); cycle(top, [&] { - if (keycode != top->io_keycode_bits){ - keycode = top->io_keycode_bits; + if (keycode != top->io_ps2_data){ + keycode = top->io_ps2_data; printf("%d\n", keycode); } });