Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB for HID-Complient Devices (mainly Keyboards) #31

Open
adac-s opened this issue Apr 26, 2023 · 0 comments
Open

USB for HID-Complient Devices (mainly Keyboards) #31

adac-s opened this issue Apr 26, 2023 · 0 comments

Comments

@adac-s
Copy link
Collaborator

adac-s commented Apr 26, 2023

NOTE: Requires #32

Implement a minimal HID keyboard driver. We need to...

a.) Detect which kind of controller is available. (UHCI and OHCI for 1.0, EHCI for 2.0, xHCI for 3.0)
- Nick's machine is a Pentium III machine (if I remember correctly) -- a architecture released before the release of USB2.0.
- In order to guarantee this machine has a working keyboard, we need to support both USB1.0 controller types.
- See relevant pages linked on the USB wiki page
b.) A transaction for USB devices is split into 3 packets:
- The token packet: contains type of data, direction of transaction, device address and endpoint number
- The data packet (optional): contains payload if data in token packet indicates that a payload is coming
- The handshake packet: sent by the receiver to acknowledge that the data was received.
c.) Of the 4 endpoint types, the Interrupt Transfer type is what HID tends to use. It requires the host to poll the USB controller to obtain data from the device. We must, in the while loop or at a clock interrupt, poll these types of endpoints and act if we receive data.

Relevant OSDev Wiki Pages:
https://wiki.osdev.org/Universal_Serial_Bus
https://wiki.osdev.org/USB_Human_Input_Devices

@adac-s adac-s assigned adac-s and unassigned adac-s Apr 26, 2023
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

No branches or pull requests

1 participant