Hi,
I am maintaining an old driver which was written based on USB FX2 learning kit. The driver is used in Windows Embedded Standard 2009 (a Xp code based OS). The hardware is communicating with client software via control pipes, an interrupt pipe (IN only), and a pair of bulk pipe (IN and OUT). The WDM sample uses exactly the same pipes configuration, so the task was easy, just remove the sample control code and added in my own.
Now, I have to add in a couple of additional bulk pipes to implement some new communication channels. In the sample, the bulk OUT and IN transfers are handled by UsbFx2LkWrite() and UsbFx2LkRead(), respectively. All those routines are in turn bound to IRP_MJ_WRITE and IRP_MJ_READ, respectively, during driver initial entry. In those UsbFx2LkWrite()/UsbFx2LkRead() routines, all the transfers are directed to BulkOutPipe/BulkInPipe, which are the only bulk pipes of the USBFX2LK kit.
I have been researching hard for more than a week now. How on earth that I could make the additional bulk pipes talk? From the client application’s CreateFile() to WriteFile()/ReadFile(), there is no way to pass any parameter/argument to UsbFx2LkWrite()/UsbFx2LkRead(), telling them which pipe this transfer is intended to.
Does this mean one driver can support only one bulk OUT/IN pair only? Oh, I do not believe this, and hopefully I am wrong. Obviously I have been missing something (simple?).
Really appreciate if someone could point me to the right direction.
Thanks and best regards,
WH Tan