USB stack - who's done their own, and who ported one?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
thewrongchristian
Member
Member
Posts: 426
Joined: Tue Apr 03, 2018 2:44 am

Re: USB stack - who's done their own, and who ported one?

Post by thewrongchristian »

I should give a bit of an update.

I have a mostly working UHCI based stack, working under QEMU. Testing on real hardware locked up when I removed a device, so I need to figure out and handle that.

I can find HID devices, but not yet plumbed it in to an event system. I'm toying with the idea of export HID to user space, so that the user code just gets and interprets HID reports, and existing PS/2 kbd/mouse can emulate a HID based interface. But that's speculation at the moment, I was just happy to reliably read reports.

I can read and write bulk only transport storage, and I'm currently re-jigging my block device stack based on what I've learned since I originally wrote that (have to refactor the IDE drivers, and the block device interface.)

My USB interface looks reasonably independent of the HCI, so the next task will be to do an EHCI driver, but that might have to wait until I've done the block device interface refactoring.

No hubs yet, other than the UHCI root hub.

Snapshot of the USB related files:
http://thewrongchristian.org.uk:8082/di ... rivers/usb
User avatar
bellezzasolo
Member
Member
Posts: 110
Joined: Sun Feb 20, 2011 2:01 pm

Re: USB stack - who's done their own, and who ported one?

Post by bellezzasolo »

Bumping this thread, I've been working on my USB stack.

Strangeness first, the reset procedure leaves the devices powered up after powering off!
Image

But after much head scratching, I finally made a breakthrough with xHCI.
Image

A little bit of refactoring and a couple days more headscratching, and I now have preliminary support for USB hubs.
Image
Whoever said you can't do OS development on Windows?
https://github.com/ChaiSoft/ChaiOS
Post Reply