Host FX3 C++ API : multiple devices management | Cypress Semiconductor
Host FX3 C++ API : multiple devices management
I have read the "Cypress CyAPI Programmer's reference", and I still wonder how to manage multiple devices concurrently (in separate threads) in the running host application.
The problem is that the CCyUSBDevice object is used to enumerate devices, but is also the only instance on which you can call Open().
Let's say that CCyUSBDevice reports me 2 devices (let's say 0 and 1). Is it allowed to clone the CCyUSBDevice instance in two threads A and B and call ->Open(0) in thread 1 and ->Open(1) in thread B ?
I was expecting Open() to return an kind of "entry point" to a device instance, rather than modifying the internal state of the object used for enumeration !
How is it to be used ?