I am communicating with a [Cypress FX3 kit](https://www.cypress.com/products/ez-usb-fx3-superspeed-usb-30-peripheral-controller) device.
I did everything that was explained on AN84868. However, I would like to do my own source code so that I can integrate it with my code. (On linux)
I call cyusb_control_write() with:
bReqType: 40 (hex)
bType: 40 (hex)
wLength: 16 (decimal)
|C++ code fragment|
rStatus = cyusb_control_write(
MimacUSB3Connection::device_handle, /* a handle for the device to communicate with */
Everytime I run there are 3 options (in order of frequency):
Why could this be happening? As I get unexpected output I am clueless on how to debug this. My main concern is cyusb_control_write not returning after sending the data.
I solved the problem. Instead of using this static variable I'm using cyusb_gethandle(0) to get the handle.
I'm still trying to fully understand the problem (why my static variable didn't work). But I solved immediate problem.