Skip to content

USB Support - #190

Open
y4my4my4m wants to merge 5 commits into
masterfrom
usb-dev-y4m
Open

USB Support#190
y4my4my4m wants to merge 5 commits into
masterfrom
usb-dev-y4m

Conversation

@y4my4my4m

Copy link
Copy Markdown
Collaborator

Mouse, Keyboard, USB Drives function (QEMU tested only, would be nice to have someone try with hardware :) )

image

This commit introduces a comprehensive USB stack, including support for USB mass storage devices and Human Interface Devices (HID) such as keyboards and mice. Key changes include:

- New files for USB core functionality, xHCI host controller, and device enumeration.
- Implementation of bulk-only transport for mass storage devices.
- Integration of HID protocols for keyboard and mouse input.
- Updates to existing block device handling to accommodate USB devices.

This enhancement significantly expands the system's capabilities for handling USB peripherals.
This update modifies the USB stack to replace the function pointer auto_cb with an integer auto_kind for handling HID report callbacks. Changes include:

- Updated endpoint descriptor structure to use auto_kind for specifying report handler types (USB_AUTO_NONE, USB_AUTO_KBD, USB_AUTO_MOUSE).
- Adjusted relevant functions to accommodate this change, enhancing clarity and maintainability of the code.

This refactor streamlines the dispatching of report handlers in the USB HID implementation.
This update modifies the CUsbEP class to store a pointer to CXhciRing instead of embedding it directly. This change addresses limitations in the ZealC JIT class parser regarding nested class structures. Additionally, new initialization functions for endpoint rings have been introduced, ensuring proper memory allocation and initialization on first use. The code has been updated accordingly to reflect these changes, enhancing the overall structure and maintainability of the USB endpoint handling.
This update modifies the USB device structure and related functions to replace the eps array with ep_list for managing USB endpoints. Changes include updating references in the parsing, attachment, and configuration functions to ensure consistency and improve code clarity. This refactor enhances maintainability and aligns with recent structural changes in the USB stack.
@y4my4my4m
y4my4my4m requested a review from GutPuncher July 23, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant