Device hardware
or firmware configures each endpoint address for a specific USB transfer type
and direction. The number of available endpoints varies with the device controller.
A USB virtual COM port typically uses three endpoint addresses in
addition to endpoint zero.
Inside USB
321
Each endpoint address except endpoint zero has an endpoint descriptor. The
descriptor??™s wMaxPacketSize field specifies how many bytes the endpoint can
transfer in a data packet. For bulk endpoints, wMaxPacketSize can be up to 64
for full-speed endpoints and must be 512 for high-speed endpoints. (The
device descriptor specifies the maximum packet size for endpoint zero.)
/!
The USB specification defines structures for transferring data on the bus and
ensuring that transmitted data reaches its receiver.
!5
One reason why USB is suitable for a wide range of devices is its support for
four types of data transfers (Table 14-1).
Control transfers enable the host to learn about a device, set a device??™s address,
and select configurations and other settings. The host uses control transfers to
learn about the device during enumeration. Control transfers can also send
class-specific and vendor-specific requests that transfer data for any purpose. A
USB host typically uses control transfers to send serial-port parameters for the
device to implement. Control transfers can also request to set serial-port control
signals.
Pages:
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333