USB Stack & HID Refactor

- New units: usbtypes, usbcore, usbhub, UHCI, OHCI, usb_keyboard,
  usb_mouse
- usbtypes: shared USB descriptors, constants, HC abstraction,
  aligned alloc, unit tests
- usb_keyboard: USB HID boot keyboard driver with HID-to-ASCII
  translation, polling, unit tests
- usb_mouse: USB HID boot mouse driver with delta/scroll/button
  processing, polling, unit tests

HID Layer Restructure:
- keyboard.pas: stripped to abstract API (hook + reportKeyEvent),
  no PS/2 dependency
- mouse.pas: absorbed mousestate.pas, now owns
  position/buttons/scroll/hooks directly
- mousestate.pas: deleted (merged into mouse.pas)
- New ps2_keyboard.pas: PS/2 scan code translation,
  calls keyboard.reportKeyEvent
- New ps2_mouse.pas: PS/2 packet handling, calls
  mouse.setMousePos/fireMouseEvent

LVGL Integration:
- lvgl.pas: updated to use mouse.pas directly (was mousestate),
  improved keyboard input handling with proper key held/release tracking
- vterminal.pas: removed serial debug logging, dropped serial dependency

Kernel:
- kernel.pas: added USB units, USB polling in main loop, unit test
  calls, ps2_keyboard/ps2_mouse init
This commit is contained in:
t3hn3rd committed 2026-03-01 21:23:33 +00:00
1 parent afdc83eaf6
commit cb7144f282
22 files changed
+6886 -1015

No files matched your search

+1 -4
View File
@@ -12,7 +12,7 @@ unit vterminal;
interface
uses
lvgl, video, windows, desktop, keyboard, serial, tracer,
lvgl, video, windows, desktop, keyboard, tracer,
strings, util, lmemorymanager, asuro, stdio, vfs;
procedure init;
@@ -115,9 +115,6 @@ begin
lv_obj_update_layout(lv_screen_active);
{ Get remaining scrollable distance to bottom and scroll by that }
sb := lv_obj_get_scroll_bottom(content);
serial.sendString('[VT] scroll_bottom=');
serial.sendString(intToString(sb));
serial.sendString(#13#10);
if sb > 0 then
lv_obj_scroll_by(content, 0, -sb, LV_ANIM_OFF);
end;