
Spinpoint M9TU-USB 3.0 Product Manual REV 1.0
62
USB INTERFACE AND USB COMMANDS
6.3.6.3.9
Set Descriptor (Request Code 7)
This request is optional and may be used to update existing descriptors or new descriptors may be added.
The
wValue
field specifies the descriptor type in the high byte (refer to Table 6-8) and the descriptor index in
the low byte. The descriptor index is used to select a specific descriptor (only for configuration and string
descriptors) when several descriptors of the same type are implemented in a device. For example, a device can
implement several configuration descriptors. For other standard descriptors that can be set via a SetDescriptor()
request, a descriptor index of zero must be used. The range of values used for a descriptor index is from 0 to one
less than the number of descriptors of that type implemented by the device.
The
wIndex
field specifies the Language ID for string descriptors or is reset to zero for other descriptors. The
wLength
field specifies the number of bytes to transfer from the host to the device.
The only allowed values for descriptor type are device, configuration, and string descriptor types. If this request
is not supported, the device will respond with a Request Error.
Default state
: Device behavior when this request is received while the device is in the Default state is not
specified.
Address state
: If supported, this is a valid request when the device is in the Address state.
Configured state
: If supported, this is a valid request when the device is in the Configured state.
6.3.6.3.10
Set Feature (Request Code 3)
This request is used to set or enable a specific feature.
Feature selector values in
wValue
must be appropriate to the recipient. Only device feature selector values may
be used when the recipient is a device; only interface feature selector values may be used when the recipient is an
interface, and only endpoint feature selector values may be used when the recipient is an endpoint.
Refer to Table 6-9 for a definition of which feature selector values are defined for which recipients.
The TEST_MODE feature is only defined for a device recipient (i.e., bmRequestType = 0) and the lower byte of
wIndex must be zero. Setting the TEST_MODE feature puts the device upstream facing port into test mode. The
device will respond with a request error if the request contains an invalid test selector. The transition to test mode
must be complete no later than 3 ms after the completion of the status stage of the request. The transition to test
mode of an upstream facing port must not happen until after the status stage of the request. The power to the
device must be cycled to exit test mode of an upstream facing port of a device. A SetFeature() request that
references a feature that cannot be set or that does not exist causes a STALL to be returned in the Status stage of
the request.
If the feature selector is
TEST_MODE
, then the most significant byte of
wIndex
is used to specify the specific
test mode. The recipient of a SetFeature(TEST_MODE…) must be the device; i.e., the lower byte of
wIndex
must
be zero and the
bmRequestType
must be set to zero. The device must have its power cycled to exit test mode. The
valid test mode selectors are listed in Table 6-10.
If
wLength
is non-zero, then the behavior of the device is not specified.
If an endpoint or interface is specified that does not exist, then the device responds with a Request Error.
Default state
: A device must be able to accept a SetFeature(TEST_MODE, TEST_SELECTOR) request when in
the Default State. Device behavior for other SetFeature requests while the device is in the Default state is not
specified
.
Address state
: If an interface or an endpoint other than endpoint zero is specified, then the device responds with
a Request Error.
Configured state
: This is a valid request when the device is in the Configured state.