Can anybody give a simple code for EHCI!

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.
ppppllll1234
Posts: 13
Joined: Sat Apr 09, 2011 9:28 pm

Can anybody give a simple code for EHCI!

Post by ppppllll1234 »

Can anybody give a simple C code for EHCI ?

the code function is use EHCI to read USB Device Descritptor!

Very Thanks!!!
madeofstaples
Member
Member
Posts: 204
Joined: Thu Apr 12, 2007 8:15 am
Location: Michigan

Re: Can anybody give a simple code for EHCI!

Post by madeofstaples »

While it is frowned upon to directly ask for working source code, it may be helpful for me to complete a tutorial if I do help you through this. I may be a little busy tomorrow (well, today I guess), but maybe we can make this a mutual effort that will benefit others as well.
Some people are offended by the verifiable truth; such people tend to remain blissfully unencumbered by fact.
If you are one of these people, my posts may cause considerable discomfort. Read at your own risk.
ppppllll1234
Posts: 13
Joined: Sat Apr 09, 2011 9:28 pm

Re: Can anybody give a simple code for EHCI!

Post by ppppllll1234 »

this website have a simple code for UHCI to read USB Device:

http://www.frontiernet.net/~fys/usb.htm

I want to get a simple code like the code ,but it's for EHCI
ppppllll1234
Posts: 13
Joined: Sat Apr 09, 2011 9:28 pm

Re: Can anybody give a simple code for EHCI!

Post by ppppllll1234 »

Can anybody help me? I'm crazy
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: Can anybody give a simple code for EHCI!

Post by Brynet-Inc »

ppppllll1234 wrote:Can anybody help me? I'm crazy
Hi crazy, I'm wacko.

EDIT: Removed 2015: Imageshack replaced all links with spam.
Last edited by Brynet-Inc on Fri Aug 28, 2015 8:40 pm, edited 1 time in total.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
ppppllll1234
Posts: 13
Joined: Sat Apr 09, 2011 9:28 pm

Re: Can anybody give a simple code for EHCI!

Post by ppppllll1234 »

Does nobody known EHCI ? It's simple code don't write out?
User avatar
JackScott
Member
Member
Posts: 1031
Joined: Thu Dec 21, 2006 3:03 am
Location: Hobart, Australia
Contact:

Re: Can anybody give a simple code for EHCI!

Post by JackScott »

There are quite a few people here who have implemented an EHCI controller (I'm not one of them).

Understand that it's frowned upon to ask directly for source code. Nobody learns from just using pasted source code, only from truly understanding the answer. You'll be much better off attempting to implement a driver based on the wiki and the specifications, and then posting here with any specific problems you have.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: Can anybody give a simple code for EHCI!

Post by jal »

Not to mention that you are nagging. Most people hate nagging.


JAL
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Can anybody give a simple code for EHCI!

Post by Solar »

And you are aware that the UHCI code you referenced is (quote) "a rough draft" that "is purposely bloated" to serve as template for a size-coding contest - not as a replacement for a 150-page standard spec and / or the 2000-line Wiki article we have on the subject?
Every good solution is obvious once you've found it.
rdos
Member
Member
Posts: 3306
Joined: Wed Oct 01, 2008 1:55 pm

Re: Can anybody give a simple code for EHCI!

Post by rdos »

Link to EHCI-driver: http://rdos.net/vc/viewvc.cgi/trunk/ker ... iew=markup

It is not complete (quite a few stubs), and any EHCI-driver must necesarily live side-by-side with some USB abstraction, and an OHCI/UHCI companion driver.

IOW, there are no fast short-cuts to a working EHCI.
User avatar
ehenkes
Member
Member
Posts: 124
Joined: Mon Mar 23, 2009 3:15 am
Location: Germany
Contact:

Re: Can anybody give a simple code for EHCI!

Post by ehenkes »

There are quite a few people here who have implemented an EHCI controller (I'm not one of them).
PrettyOS team is going to implement all usb HC drivers (ehci/uhci/ohci/xhci). EHCI and corresponding USB 2.0 transfers work well. We can use memory-sticks as usb mass storage devices with FAT12/16/32.

http://85.214.142.202/pretty/doc/ehci_8c-source.html
http://85.214.142.202/pretty/doc/ehciQHqTD_8c.html
http://85.214.142.202/pretty/doc/usb__hc_8c.html
http://85.214.142.202/pretty/doc/usb2_8c.html
http://85.214.142.202/pretty/doc/usb2__msd_8c.html

We could need assistance with ohci-usb-transactions :D
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: Can anybody give a simple code for EHCI!

Post by Brynet-Inc »

ehenkes wrote:
There are quite a few people here who have implemented an EHCI controller (I'm not one of them).
PrettyOS team is going to implement all usb HC drivers (ehci/uhci/ohci/xhci). EHCI and corresponding USB 2.0 transfers work well. We can use memory-sticks as usb mass storage devices with FAT12/16/32.

http://85.214.142.202/pretty/doc/ehci_8c-source.html
http://85.214.142.202/pretty/doc/ehciQHqTD_8c.html
http://85.214.142.202/pretty/doc/usb__hc_8c.html
http://85.214.142.202/pretty/doc/usb2_8c.html
http://85.214.142.202/pretty/doc/usb2__msd_8c.html

We could need assistance with ohci-usb-transactions :D
This topic is several months old..

BTW, links to IP addresses are not future-proof, you might want to look into fixing that.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
ehenkes
Member
Member
Posts: 124
Joined: Mon Mar 23, 2009 3:15 am
Location: Germany
Contact:

Re: Can anybody give a simple code for EHCI!

Post by ehenkes »

Best Link: http://prettyos.de

UHCI, OHCI work well on emulators. EHCI works well with real hardware.

We are just working on a xHCI driver. It works well with real hardware.
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: Can anybody give a simple code for EHCI!

Post by Combuster »

Necromancy bordering on advertising? :shock:
"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 ]
rdos
Member
Member
Posts: 3306
Joined: Wed Oct 01, 2008 1:55 pm

Re: Can anybody give a simple code for EHCI!

Post by rdos »

Many modern computers with EHCI lack companion controllers and instead have an internal HUB, which means that the USB HUB functionality also must be implemented before you have anything useful.
Post Reply