next up previous contents
Next: 10. Dynamically Loading Your Up: 9. USB Control Transfers Previous: 9.1 USB Control Transfers   Contents

Subsections


9.2 Performing Control Transfers with WinDriver

WinDriver allows you to easily send and receive control transfers on Pipe00, while using DriverWizard to test your device. You can either use the API generated by DriverWizard [5] for your hardware, or directly call the WinDriver WDU_Transfer() [A.3.7] function from within your application.


9.2.1 Control Transfers with DriverWizard

  1. Choose Pipe00 and click Read/Write To Pipe.

  2. You can either enter a custom setup packet, or use a standard USB request.

  3. The results of the transfer, such as the data that was read or a relevant error, are displayed in Driver Wizard's Log window.
    Figure 9.5 below shows the contents of the Log window after a successful GET_DESCRIPTOR DEVICE request.

    Figure 9.5: USB Request Log
    Image wiz_usb_ctr_req_GetDescDev_log


9.2.2 Control Transfers with WinDriver API

To perform a read or write transaction on the control pipe, you can either use the API generated by DriverWizard for your hardware, or directly call the WinDriver WDU_Transfer() [A.3.7] function from within your application.

Fill the setup packet in the BYTE SetupPacket[8] array and call these functions to send setup packets on Pipe00 and to retrieve control and status data from the device.

For further information regarding WDU_TransferDefaultPipe(), refer to section A.3.9. For further information regarding WDU_Transfer(), refer to section A.3.7.


next up previous contents
Next: 10. Dynamically Loading Your Up: 9. USB Control Transfers Previous: 9.1 USB Control Transfers   Contents