> build_npc_VKeyboard_nvboard

ysyx_22040000 李心杨
 Linux calcite 6.1.69 #1-NixOS SMP PREEMPT_DYNAMIC Wed Dec 20 16:00:29 UTC 2023 x86_64 GNU/Linux
  17:27:21  up 2 days 16:28,  2 users,  load average: 0.54, 0.76, 0.75
This commit is contained in:
tracer-ysyx 2024-01-10 17:27:21 +08:00 committed by xinyangli
parent 3595b4802e
commit 4a4ff0d3ae
No known key found for this signature in database

View file

@ -10,8 +10,9 @@
#define CLASS_SYSTEM_HEADER_NAME(name) CLASS_SYSTEM_HEADER_NAME_IMPL(name)
#define CLASS_SYSTEM_HEADER_NAME_IMPL(name) <name.h>
#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);
}
});