- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In theC:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\application\cpp\bulkloop,there is a demo called bulkloop.
int nDeviceIndex = 0;
m_selectedUSBDevice->Open(nDeviceIndex);
The nDeviceIndex is always o.
If there are several devices,how can i get it? Maybe i select second device,how can it distinguish?
I think it maybe a mistake!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
You can distinguish the devices based on the VID/PID combination. This attribute is defined to be a part of the CCyUSBDevice class and can be accessed through an instance of the class.
Example:
do {
// Open() automatically calls Close() if necessary
USBDevice->Open(d);
vID = USBDevice->VendorID;
pID = USBDevice->ProductID;
d++;
} while ((d < devices ) && (vID != 0x04b4) && (pID != 0x00f1));
In case you have multiple devices with the same VID/PID, distinction can be made possible through the addition of a unique serial number in the device firmware (string descriptors). The serial number can be queried on the host application using the wchar_t CCyUSBDevice::SerialNumber attribute of the CCyUSBDevice class.
Best regards,
Srinath S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
You can distinguish the devices based on the VID/PID combination. This attribute is defined to be a part of the CCyUSBDevice class and can be accessed through an instance of the class.
Example:
do {
// Open() automatically calls Close() if necessary
USBDevice->Open(d);
vID = USBDevice->VendorID;
pID = USBDevice->ProductID;
d++;
} while ((d < devices ) && (vID != 0x04b4) && (pID != 0x00f1));
In case you have multiple devices with the same VID/PID, distinction can be made possible through the addition of a unique serial number in the device firmware (string descriptors). The serial number can be queried on the host application using the wchar_t CCyUSBDevice::SerialNumber attribute of the CCyUSBDevice class.
Best regards,
Srinath S