USB driver

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.
Post Reply
_mark

USB driver

Post by _mark »

Anyone have source/docs or tutorial links on USB they would like to share?

Thanks
_mark()
Tim

Re:USB driver

Post by Tim »

No. If you wrote some USB code, AFAIK you'd be the first developer of a small OS to do so.

Please write a tutorial when you are done, so that the rest of us can use USB.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:USB driver

Post by Pype.Clicker »

in late '90s, i found a document from Intel explaining how USB works (that was hidden in the chipset datasheet with UDMA, AGP and other funny things like these).

No, i can't provide a link, because it probably has move. Just go to developer.intel.com :)

However, the best you'll probably be able to do is to provide enumeration and detection of new devices, but talking to the DEVICE itself ... hum ... i mean, the USB printer, or scanner, or joystick, or Alcatel modem ... this is the job of the hardware manufacturers, unfortunately.

And, as usual, they will not give you the knowledge to do so because it is too dangerous for them (or at least they think so :) )
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:USB driver

Post by distantvoices »

would be interesting. the usb abstracts the special needs of the devices more to faciliate uniform communication. Would suffice to say to usb: I want the printer print a doc, here is the data, do it?

_mark(), why don't you drop an eye into the linux source code? I 've found some usb.c stuff there.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
_mark

Re:USB driver

Post by _mark »

Ya - I been poking around in the linux source. With any luck I can put together a more simple example....:)

_mark()
Tim

Re:USB driver

Post by Tim »

Just to expand on what I posted earlier: the information required to write your own USB stack should be out there, since the hardware is all standard. The reason why it's so difficult is because all the intelligence is in the drivers on the PC. This lets hardware manufacturers make really cheap and simple devices, because the clever stuff is only written once (presumably by Microsoft, inside Windows).
K.J.

Re:USB driver

Post by K.J. »

These may or may not help, but they are worth a try:
http://www.usb.org/developers/docs
http://www.cybertrails.com/~fys/usb.htm

K.J.
_mark

Re:USB driver

Post by _mark »

hey - thanks, I had found that first one, but the second link is good in that it provides practicle examples.

_mark()
K.J.

Re:USB driver

Post by K.J. »

spm

Re:USB driver

Post by spm »

Hi. There's a lot of good PDF's on the subject.. although I haven't yet dared try implementing USB, it seems like I might have to tomorrow (two freinds coming over with a semi-suicidal plan for making fun use of a little machine that can... :) )

Here's some stuff:

http://yaxic.foo.is/docs/usb/usb_20.pdf <-- The USB 2.0 specification.
http://yaxic.foo.is/docs/usb/ <-- Loads of PDF's.

Have fun. :)
_mark

Re:USB driver

Post by _mark »

Thanks everyone - the links are helpful - my brain is kind of in USB overload right now though. Seems it is a slight bit more complicated then my keyboard driver...:)

_mark()
anizzomc
Posts: 3
Joined: Wed Apr 28, 2010 6:51 am

Re: USB driver

Post by anizzomc »

After 10 years...

You guys managed to make an implementation? [-o<
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: USB driver

Post by Combuster »

They didn't live to tell the tale... :wink:

We have the USB page for all sorts of details
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
M2004
Member
Member
Posts: 65
Joined: Sun Mar 07, 2010 2:12 am

Re: USB driver

Post by M2004 »

http://code.google.com/p/tatos/

Tatos has got a working ehci/uhci driver implementation.

Regards
M2004
User avatar
ehenkes
Member
Member
Posts: 124
Joined: Mon Mar 23, 2009 3:15 am
Location: Germany
Contact:

Re: USB driver

Post by ehenkes »

PrettyOS owns implementation for UHCI, OHCI, EHCI. USB 2.0 works well with mass storage devices.
http://sourceforge.net/p/prettyos/code/ ... l/storage/
Post Reply