Yes. You make a setup transaction using a descriptor with a SETUP PID, which is different for each type of USB host controller. The data buffer of the SETUP descriptor will contain a setup packet. Then, after the device receives it successfully, you (optionally, according to the specific request) send/receive data to/from the device using another descriptors with IN/OUT PIDs. Then, after that is successful, you send/receive a status packet, which can be either an IN/OUT descriptor depending on the data stages. The USB spec has more information on this.
Something else to keep in mind is that you cannot send/receive data in one descriptor that is larger than the device's maximum packet size. For a sample device with a maximum packet size of 8 bytes, to send 32 bytes of data to said device, you'll need 4 different descriptors, each transferring 8 bytes of data.
_________________ You know your OS is advanced when you stop using the Intel programming guide as a reference.
|