⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 x33.html

📁 usb develop guide
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//Norman Walsh//DTD DocBook HTML 1.0//EN"><HTML><HEAD><TITLE>USB Devices and Transfer Characteristics</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet"><LINKREL="HOME"TITLE="The Linux USB sub-system"HREF="book1.html"><LINKREL="UP"TITLE="USB Introduction"HREF="c15.html"><LINKREL="PREVIOUS"TITLE="Host Controllers"HREF="x29.html"><LINKREL="NEXT"TITLE="Enumeration and Device Descriptors"HREF="x75.html"></HEAD><BODY><DIVCLASS="NAVHEADER"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">The Linux USB sub-system</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="x29.html">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 1. USB Introduction</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="x75.html">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="AEN33">USB Devices and Transfer Characteristics</A></H1><P>There are a wide range of USB devices intended for a wide range ofpurposes, and this means that implementation details can vary widely. </P><P>A device can be self powered,  bus powered or both. The USB can providea power supply up to 500mA for its devices. If there are only bus powereddevices on the bus the maximum power dissipation could be exceeded andtherefore self powered devices exist. They need to have their own powersupply. Devices that support both power types can switch to self powered modewhen attaching an external power supply. </P><P>Even the maximum communication speed can differ for particular USB devices.The USB specification differentiates between low speed and  full speed devices.Low speed devices (such as mice, keyboards, joysticks etc.) communicateat 1.5MBit/s and have only limited capabilities. Full speed devices (suchas audio and video systems) can use up to 90% of the 12Mbit/s which is about10Mbit/s including the protocol overhead.</P><DIVCLASS="FIGURE"><P><B><ANAME="FIGTOPOLOGY">Figure 1-1. USB Topology</A></B></P><P><IMGSRC="topo.gif"></P></DIV><P>Version 2.0 of the USB specification is being developed, and is expected todeliver up to 480Mbit/s raw throughput.</P><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN42">Hubs</A></H2><P>Physically there exist one, two or four USB ports at the rear panel of acomputer. These ports can be used to attach normal devices or a hub. Ahub is a USB device which extends the number of ports toconnect other USB devices. The maximum number of user devices is reducedby the number of hubs on the bus (i.e. if you attach 50 hubs, then at most 77 (=127-50) additional devices can be attached. Hubs are always full speeddevices. If the hub is self powered, then any device can be attached to it.However if the hub is bus powered, then only low power (100mA max) devicescan be attached to it. A bus powered hub should not be connected to anotherbus powered hub - you should alternate between bus powered and self poweredhubs.</P><P>Normally the physical ports of the host controller are handled by avirtual root hub. This hub is simulated by the hostcontrollers device driver and helps to unify the bus topology. So every port canbe handled in the same way by the USB subsystem's hub driver (see<AHREF="x33.html#FIGTOPOLOGY">Figure 1-1</A>).</P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN47">Data Flow Types</A></H2><P>The communication on the USB is done in two directions and uses four differenttransfer types. Data directed from the host to a device is calleddownstream or OUT transfer. The other direction is calledupstream or IN transfer. Depending on the device type differenttransfer variants are used:<P></P><UL><LI><P><ICLASS="EMPHASIS">Control transfers</I> are used to request andsend reliable short data packets. It is used to configure devices and every oneis required to support a minimum set of control commands. The standard commands are:<P></P><TABLEBORDER="0"><TR><TD>GET_STATUS</TD></TR><TR><TD>CLEAR_FEATURE</TD></TR><TR><TD>SET_FEATURE</TD></TR><TR><TD>SET_ADDRESS</TD></TR><TR><TD>GET_DESCRIPTOR</TD></TR><TR><TD>SET_DESCRIPTOR</TD></TR><TR><TD>GET_CONFIGURATION</TD></TR><TR><TD>SET_CONFIGURATION</TD></TR><TR><TD>GET_INTERFACE</TD></TR><TR><TD>SET_INTERFACE</TD></TR><TR><TD>SYNCH_FRAME</TD></TR></TABLE><P></P>Further control commands can be used to transfer vendor specific data.&#13;</P></LI><LI><P><ICLASS="EMPHASIS">Bulk transfers</I> are used to request or sendreliable data packets up to the full bus bandwidth. Devices like scanners orscsi adapters use this transfer type.</P></LI><LI><P><ICLASS="EMPHASIS">Interrupt transfers</I> are similar to bulktransfers which are polled periodically. If an interrupt transfer was submittedthe host controller driver will automatically repeat this request in a specifiedinterval (1ms - 127ms).</P></LI><LI><P><ICLASS="EMPHASIS">Isochronous transfers</I> send or receivedata streams in realtime with guaranteed bus bandwidth but without anyreliability. In general these transfer types are used for audio and videodevices.</P></LI></UL>&#13;</P></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="x29.html">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="book1.html">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="x75.html">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Host Controllers</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="c15.html">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Enumeration and Device Descriptors</TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -