![](/images/new-backgrounds/1196317/19631785x1.webp)
Chapter 4 Software Development
7 | SET_DESCRIPTOR | Update or add a descriptor |
8 | GET_CONFIGURATION | Return the current device configuration value |
9 | SET_CONFIGURATION | Set the device configuration value |
10 | GET_INTERFACE | Return the selected alternate setting for the specified interface |
11 | SET_INTERFACE | Set the alternate setting for the specified interface |
12 | SYNCH_FRAME | Set and report an endpoint's synchronization frame |
4-1-12. Device Descriptors
When a USB device first connects to the bus, it reports its attributes to the host with a device descriptor. Figure 4.1.3 illustrates the hierarchical structure of this data structure with the device descriptor for a bidirectional printer.
Endpoint descriptors give the physical capabilities of the endpoints already discussed in Section 4.1.7 above.
Groups of endpoint descriptors form logical communications functions called interfaces. These interfaces support alternate settings for changing the interface and thus device characteristics. Note that these interfaces are mutually exclusive in that only one can be in use at any given time.
n Device |
|
| ||||||
|
| o Configuration #1 |
|
| ||||
|
|
|
| |||||
|
|
| u Interface #1 | alternate setting #0 | ; | |||
|
|
| ||||||
|
|
|
|
| ¡ Endpoint #1 | BulkOut |
| |
|
|
|
|
|
| |||
|
|
| u Interface #1 | alternate setting #1 | ; bidirectional printer | |||
|
|
| ||||||
|
|
|
|
| ¡ Endpoint #1 | BulkOut |
| |
|
|
|
|
|
| |||
|
|
|
|
| ¡ Endpoint #2 | BulkIn |
| |
|
|
|
|
|
| |||
|
|
| u Interface #1 | alternate setting #2 | ; bidirectional printer | |||
|
|
| ||||||
|
|
|
| ¡ Endpoint #1 | BulkOut |
| ||
|
|
|
|
| ||||
|
|
|
| ¡ Endpoint #2 | BulkIn |
| ||
|
|
|
|
| ||||
|
|
|
| ¡ Endpoint #3 | InterruptIn | ; Inform of data volumes by interrupt transfer | ||
|
|
|
| |||||
|
|
|
|
|
| Figure 4.1.3. | Device Descriptor for Bidirectional Printer |
Higher up the hierarchy are the configuration and device layers. The same device can have multiple
The following are brief listings of descriptor contents. For detailed descriptions, refer to Section 9.4 of the USB version 1.1 specifications.
(1) Device descriptor
USB Specification release number in binary coded decimal
Device class code
Device subclass code
Protocol code
Maximum packet size for endpoint 0 (EP0)
Vendor and product IDs
page