PORTS Forum

Ports and Interfaces => USB => Topic started by: phamtv on February 17, 2012, 05:41:31 pm

Title: communicating to endpoint 0
Post by: phamtv on February 17, 2012, 05:41:31 pm
its been a week of R&D and I have to admit that writing a window's driver can be quite challenging.  Nonetheless, that's why I am here.  As I have discussed in a previous thread, I am trying to communicate to a vendor specific interface via usb.  I was able to communicate to the interface using libusb. This is proof of concept that my device enumerates properly.  My next challenge is to write a windows kernal driver for my device.  What I am curious about is, when I am in the kernel (using wdf), how can I write to control endpoint 0 (similar to that of libusb ControlTransfer(setuppkt,....) function)?  Thank you for your time and support!!!
Title: Re: communicating to endpoint 0
Post by: Jan Axelson on February 17, 2012, 08:38:12 pm
I believe you're looking for WdfUsbTargetDeviceSendControlTransferSynchronously:

http://msdn.microsoft.com/en-us/library/windows/hardware/ff550104%28v=vs.85%29.aspx

Jan