Information Technology Reference
In-Depth Information
Manage Power
In normal operation, a device must limit the bus current consumed to either
100 milliamperes or a higher amount, up to 500 mA, approved by the host
during enumeration. A device must also detect the presence of the host's
periodic timing markers and enter the low-power Suspend state when the
markers are absent. While in the Suspend state, the device must monitor the
bus and exit the Suspend state when bus activity resumes.
In the mass-storage class, most hard drives provide their own power supplies
to replace or supplement the current available from the bus, while most flash
drives use bus power only.
Respond to Standard Requests
On power-up or on attachment to a powered host, a device must respond to
standard requests sent by the host during enumeration. The host may also
send requests any time after enumeration completes. The requests query the
capabilities and status of the device or request the device to take other
action.
Handle Error Checking
When transmitting data, the device adds error-checking bits. When receiv-
ing data, the device uses received error-checking bits to detect errors.
Exchange Data with the Host
All of the above tasks support the main job of the device's USB port, which
is to exchange data with the host.
Each device on the bus has an address and every transaction between a host
and a device contains a device address. On detecting a matching address, a
device must return requested data or status information. A device may store
received data and trigger an interrupt to notify device firmware that a com-
munication has occurred.
Implement the Device's Function
Of course, a device must also do anything required to implement its func-
tion. For some mass-storage devices, the device's only task is to store blocks
of data received from the host and send blocks of data requested by the host.
Search WWH ::




Custom Search