How to reference USB devices in CyApi and CyUsb.Net | Cypress Semiconductor
How to reference USB devices in CyApi and CyUsb.Net
I'm writing an application that has multiple processes. One process is written in C# and uses CyUsb.Net to discover the Cypress USB devices that are connected. I then have another process written in C++ using CyApi that accesses the USB device. This C++ process is started by the C# process and is told which USB device to use.
My devices do not have unique serial numbers.
What can I use to identify the same device in the C# and C++ processes?
From C# / CyUsb.Net I can go through each USBDevice in USBDeviceList and obtain the Path, USBAddress and SerialNumber (which is not unique).
From C++ / CyApi I can call CCyUSBDevice::Open and tell it to open a particular device number. Is this device number the same as the USBAddress that CyUsb.Net returns? Or does it match something else in the CyUsb.Net interface?
Alternatively, in CyApi, does the CCyUSBDevice::USBAddress match the CyUsb.Net USBAddress?
Or can I use the CyUsb.Net Path to get hold of the same device in CyApi?