1.Whether USB stack should be implemented for each type of storage device or one single USB stack is enough for all the storage devices.
Whether Drivers for disk controllers are included within the operating system or a controller card or we have to write our own.
What's the difference b/w USB host stack and USB device stack and how they will communicate.
Whether the USB stack will be different for different hardware platform. If so for which I need to search?
Whether USB drivers and USB stack are same
Thanks
Didn't find your answer? Ask the community — no account required.
R
Richard
??? Basically everything then.
Try
formatting link
and
formatting link
for answers to life the universe and everything.
Regards, Richard.
formatting link
F
Felix Bertram
Hi guru,
your questions are a little too unspecific, so I am not sure if I can really help you.
I would strongly encourage you to:
go to
formatting link
- read the book
go to
formatting link
- have a look at some sample code
go to USB.org - have a look at the USB specification - have a look at relevant USB device class specifications
go to a chip vendor's site (e.g. Cypress) - have a look at a few data sheets
This should give you a good start into USB.
USB does not only define the basic protocol to exchange bytes between a host and a device, but also so called device classes. There are pre-defined classes for a number of devices. You are probably looking for the mass-storage class. This is a device class defining standard commands for removable media like hard drives, cameras, mp3 players and so on.
drivers for the typical device classes ship with the operating system. That's why you usually don't need to write a driver to access a USB hard drive connected to your system.
USB is an asymmetric protocol. All commands are initiated from the host side. The host handles all the device discovery and enumeration. Therefore the software on the host is much more complex than the software running on a device.
I am assuming you don't care about the host, as you will probably use a standard operating system with built-in USB support.
Talking about devices: You can easily write the device firmware in "C", so that it is portable across different hardware architectures (namely different CPUs and different USB function controllers).
You will probably need to adapt the code in order to support your USB function controller. Typical USB chips (e.g. Cypress) come with tons of sample code that you can start with.
Depends on what your term "USB stack" really refers to. I would tend to define things like this:
- USB stack is the code that discovers and enumerates generic USB devices on the bus
- USB drivers are the code that implements standard device classes and plugs into the associated operating system APIs to implement the functionality. This could be drivers for USB audio or USB storage
Going from this definition: The answer is clearly *no*.
Hope this helps, best regards
Felix
Dipl.-Ing. Felix Bertram
http://homepage.mac.com/f.bertram
G
guru
HI Felix,
Thanks a lot!!
Regards
Guru
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.