During enumeration, USB device informs host about how many end points it has and whether they are IN or OUT. Once communication starts there is no provision to change direction of end points by USB spec. However, you can re-enumerate your device again and have different set of descriptors while enumerating second time. The different set of descriptors can have end point in opposite direction.
So if you can re-enumerate your device then it is possible to have single end point in opposite directions.
Alright. Thank you for the info.
I'll analyze the code more in depth to make it work properly.
I'm using a proprietary application to send data to the device. The issue I'm having right now is that when I set the endpoint to be OUT, the host is able to send data to the device and I see the data I've sent when running the code in debug mode, but the application I'm using to send data is unable to read the reply form the device.
I asked this question because I' ve tested setting the endpoint either in IN and OUT direction noticing that when in the former direction, sending data form device to host was possible and when in the later direction, sending data from host to device was possible. This is normal since the USB data exchange is host-centric.
Then, the problem right now is, even with to endpoints, EP1 OUT and EP2 IN, bidirectional data exchange is not working.
Since direction is setted at enumeration, the driver associated with this device must be set accordingly right?
Thank you for your time.
You can go through this application note which shows simple IN and OUT transfers.
It makes use of sample PC application "Cypress Suite USB" from which you can understand drivers and C# code. You can modify your app and drivers according to that.
Thanks a lot.
It is much more clearer now!