USB - Universal Serial Bus

This forum is for discussions about science, engineering, and technical subjects.
Site Admin
User avatar
Posts: 5937
Joined: Sat Oct 25, 2003 11:12 pm
Location: Gilbert, AZ

USB - Universal Serial Bus

New postby Bud » Mon Aug 02, 2004 10:42 am

USB Notes

Sources:

USB 2.0 Specification: http://www.usb.org/developers/docs/

Source: Universal Serial Bus System Architecture: Second Edition, MindShare, Inc., Addison-Wesley. ISBN: 0-201-30975-0
Last edited by Bud on Mon Aug 02, 2004 3:57 pm, edited 2 times in total.

Site Admin
User avatar
Posts: 5937
Joined: Sat Oct 25, 2003 11:12 pm
Location: Gilbert, AZ

Setup Packet

New postby Bud » Mon Aug 02, 2004 11:04 am

This is the format of the 8-byte setup packet:

Code: Select all
Offset Size Field         Description
   0     1  Request Type  Bit-mapped transfer type (see below)
   1     1  Request       Specific request (see below)
   2     2  Value         Request-dependent value
   4     2  Index         Request-dependent index
   6     2  Length        Length of data phase to follow

Request Type:
7 6 5 4 3 2 1 0
| \_/ \_______/
|  |      +---- Recipient
|  |              0 = Device
|  |              1 = Interface
|  |              2 = Endpoint
|  |              3 = Other
|  |              4-31 reserved
|  +----------- Type
|                 0 = Standard
|                 1 = Class
|                 2 = Vendor
|                 3 = Reserved
+-------------- Data Transfer Direction
                   0 = Host to Device (Out)
                   1 = Device to Host (In)

Requests:
0 = Get_Status
1 = Clear_Feature
2 = Reserved
3 = Set_Feature
4 = Reserved
5 = Set_Address
6 = Get_Descriptor
7 = Set_Descriptor
8 = Get_Configuration
9 = Set_Configuration
A = Get_Interface
B = Set_Interface
C = Synch_Frame


Notes:

Size is in bytes.

Multi-byte fields are in little-endian format.

For the GetDescriptor request, the Value field contains the descriptor type in the high byte and the index into that descriptor in the low byte. (This fact is kinda' hidden in the spec.)

Site Admin
User avatar
Posts: 5937
Joined: Sat Oct 25, 2003 11:12 pm
Location: Gilbert, AZ

New postby Bud » Tue Jul 10, 2007 9:43 am

Linux USB Info: Linux-USB.org
Linux USB IDs: Linux-USB.org/usb.ids
The theory of evolution by cumulative natural selection is the only theory we know of that is in principle capable of explaining the existence of organized complexity.
-Richard Dawkins

Return to Engineering

Who is online

Users browsing this forum: No registered users and 1 guest