tailieunhanh - USB Complete fourth- P10
USB Complete fourth- P10:This book focuses on Windows programming for PCs, but other computers and operating systems also have USB support, including Linux and Apple Computer’s Macintosh. Some real-time kernels also support USB. | Chapter 3 CONTROL WITE TRANSFER SETUP STAGE HOST DEVICE DEVICE HOST DEVICE HOST SEQ NUM 0 THE HOST SENDS A SETUP DATA PACKET. THE DEVICE MUST RETURN ACK. DATA STAGE ZERO OR MORE TRANSACTIONS HOST DEVICE DEVICE HOST DEVICE HOST THE HOST SENDS THE DEVICE DATA. RETURNS STATUS. STATUS STAGE HOST DEVICE DEVICE HOST DEVICE HOST TP TRANSACTION PACKET THE HOST SENDS THE DEVICE A STATUS RETURNS TRANSACTION PACKET. STATUS. Figure 3-3. A Setup Data packet initiates a SuperSpeed control write transfer. A Status transaction packet initiates the Status stage. 66 A Transfer Type for Every Purpose CONTROL READ TRANSFER SETUP STAGE HOST DEVICE DEVICE HOST DEVICE HOST SEO NUM 0 THE HOST SENDS A SETUP DATA PACKET. THE DEVICE MUST RETURN ACK. DATA STAGE ONE OR MORE DATA TRANSACTIONS HOST DEVICE DEVICE HOST DEVICE HOST THE HOST SENDS DATA. THE DEVICE RETURNS STATUS. STATUS STAGE HOST DEVICE DEVICE HOST DEVICE HOST THE HOST SENDS THE DEVICE A STATUS RETURNS tp TRANSACTION PACKET TRANSACTION PACKET. STATUS. Figure 3-4. A SuperSpeed control write transfer is identical to a control read transfer except for the direction of the Data stage. 67 Chapter 3 Data Size In a control transfer s Data stage the allowed maximum data packet size varies with bus speed Bus Speed Maximum Data Packet Size Low 8 Full 8 16 32 or 64 High 64 SuperSpeed 512 These bytes include only the information transferred in the data packet USB or Data Packet Payload SuperSpeed excluding PID and CRC bits. In the Data stage all data packets except the last must be the maximum packet size for the endpoint. The maximum packet size for the default control pipe is in the device descriptor that the host retrieves during enumeration. If a transfer has more data than will fit in one data transaction the host sends or receives the data in multiple transactions. For some control read transfers the amount of data returned by the device can vary. If the amount is less than the requested number of bytes and is an even multiple of the
đang nạp các trang xem trước