From 190f0941dca7c15ef66f57c7b649430cd9fc46e5 Mon Sep 17 00:00:00 2001 From: Able Date: Sun, 1 Dec 2024 14:20:51 -0600 Subject: [PATCH] Remove old ps2_keyboard driver --- .../programs/ps2_keyboard_driver/README.md | 3 -- .../programs/ps2_keyboard_driver/meta.toml | 11 ----- .../programs/ps2_keyboard_driver/src/main.hb | 40 ------------------- 3 files changed, 54 deletions(-) delete mode 100644 sysdata/programs/ps2_keyboard_driver/README.md delete mode 100644 sysdata/programs/ps2_keyboard_driver/meta.toml delete mode 100644 sysdata/programs/ps2_keyboard_driver/src/main.hb diff --git a/sysdata/programs/ps2_keyboard_driver/README.md b/sysdata/programs/ps2_keyboard_driver/README.md deleted file mode 100644 index c76d3c828..000000000 --- a/sysdata/programs/ps2_keyboard_driver/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# PS/2 Driver - -This program is a simple driver to read keypresses from a PS/2 Keyboard Also will contain an abstraction for the PS/2 controller in general so the Mouse code will probably also live here...maybe \ No newline at end of file diff --git a/sysdata/programs/ps2_keyboard_driver/meta.toml b/sysdata/programs/ps2_keyboard_driver/meta.toml deleted file mode 100644 index 804602bd9..000000000 --- a/sysdata/programs/ps2_keyboard_driver/meta.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "ps2_keyboard_driver" -authors = ["Talha Qamar"] - -[dependants.libraries] - -[dependants.binaries] -hblang.version = "1.0.0" - -[build] -command = "hblang src/main.hb" diff --git a/sysdata/programs/ps2_keyboard_driver/src/main.hb b/sysdata/programs/ps2_keyboard_driver/src/main.hb deleted file mode 100644 index 9d2c8df1c..000000000 --- a/sysdata/programs/ps2_keyboard_driver/src/main.hb +++ /dev/null @@ -1,40 +0,0 @@ -stn := @use("../../../libraries/stn/src/lib.hb"); -.{memory, log, buffer} := stn - -intouch := @use("../../../libraries/intouch/src/lib.hb"); -.{KeyEvent} := intouch - -send_byte := fn(byte: u8): u8 { - memory.outb(96, byte) - return memory.inb(96) -} - -main := fn(): int { - buf := buffer.create("PS/2 Keyboard\0") - _ = send_byte(238) - log.info("PS/2 Driver Loaded\0") - - if send_byte(238) == 238 { - log.info("PS/2 Keyboard Echoed\0") - } - - if send_byte(244) == 250 { - log.info("Enabled scanning\0") - } - - prev_input := 250 - loop { - loop if (memory.inb(0x64) & 0x20) == 0x20 break - - input := memory.inb(96) - - if input == prev_input { - continue - } - prev_input = input - kevent := KeyEvent.(false, true, input) - - buffer.write(KeyEvent, buf, &kevent) - } - return 0 -} \ No newline at end of file