PORTS Forum
Ports and Interfaces => USB => Topic started by: Luiz Gonzaga on February 06, 2014, 11:46:00 am
-
Hi All
i´m using WINUSB to transfer data to my device. The device works fine. I have problem when i send a CONTROL WRITE with no data setup. I set wLenght to 0, but WINUSB send 1. I don´t have data in CONTROL WRITE SETUP PACKET but WINUSB put 1 byte there. Is it necessary put at least one byte in Data stage with WINUSB ?? Is this correct with WINUSB ?
I have an older driver, built with DDK that works well. The driver don´t carry an extra byte at my CONTROL WRITE SETUP.
-
The documentation suggests that the Data stage is optional:
If the application does not expect any data to be transferred during the data phase (BufferLength is zero), LengthTransferred can be NULL.
Be sure to set LengthTransferred to NULL.
http://msdn.microsoft.com/en-us/library/windows/hardware/ff540219%28v=vs.85%29.aspx
-
:)
Tanks Jan
I´m really make a mistake. I was setting zero in WINUSB_SETUP_PACKET SetupPacket. The BufferLength was set to 1.
Now, everything is correct.
Tanks for help.
-
Good to know you got it working, thanks for posting.