your questions are a little too unspecific, so I am not sure if I can really help you.
I would strongly encourage you to:
- read the book
- 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
Dipl.-Ing. Felix Bertram