??? 04/24/04 21:16 Read: times |
#69121 - RE: USB setup packet Responding to: ???'s previous message |
Frank Jin wrote:
------------------------------- Hi, ALl: I am testing the USB communication now, Host controller sends SETUP packet to USB device, I want to know what exactly 8 bytes will get by device? Thanks. Frank Hi Frank, The eight bytes that make up a setup packet are defined as follows:- Byte.Field.............Meaning ---------------------------------------------- 0....bmRequestType.....Request Type, Direction, .......................and Recipient. 1....bRequest..........The actual request. 2....wValueL...........16-bit value, varies according 3....wValueH...........to bRequest. 4....wIndexL...........16-bit field, varies according 5....wIndexH...........to bRequest. 6....wLengthL..........Number of bytes to transfer if 7....wLengthH..........there is a data phase. Your firmware needs to check the first two to find out what it should be doing with the setup packet. The other six are parameters for some of the standard requests. If you're making up Vendor Requests (requests that are specific to your device) then you can often use these bytes however you please. Hope this helps Paul PS. Sorry about the formatting, hope the table is clear enough. |
Topic | Author | Date |
USB setup packet | 01/01/70 00:00 | |
RE: USB setup packet | 01/01/70 00:00 | |
RE: USB setup packet | 01/01/70 00:00 | |
RE: USB setup packet | 01/01/70 00:00 | |
RE: USB setup packet![]() | 01/01/70 00:00 |