Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Enumerate more devices that have same pID&vID

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Enumerate more devices that have same pID&vID
Moderator:
RSKV

Post Reply
Follow this topic



Enumerate more devices that have same pID&vID

Ayi posted on 14 Nov 2012 8:44 PM PST
Top Contributor
23 Forum Posts

 Hello everyone

Now i meet a problem.I have two (meybe more) boards connect to PC by usb3.0. I want to read/write data with a Application.If just one board I know how to do that.But now two board connect to PC ,and I want to control them at the same time .e.g my device vID= 0x0547&pID = 0x1002
When just one device ,Enumerate like follows and it works well.

int devices = USBDevice->DeviceCount();
int vID, pID;
int d = 0;
do {
USBDevice->Open(d); // Open automatically calls Close() if necessary
vID = USBDevice->VendorID;
pID = USBDevice->ProductID;
d++;
} while ((d < devices ) && (vID != 0x0547) && (pID != 0x1002)); 

but now it has two device and has the same pID&vID.How can I Enumerate them.Can you give me a example 

Best Regards
Thanks




Re: Enumerate more devices that have same pID&vID

RSKV posted on 03 Dec 2012 02:01 AM PST
Cypress Employee
655 Forum Posts

Hi Ayi,

You can use serial number to distinguish the two different boards.

USBDevice->SerialNumber can be added to your condition checks to identify the devices differently.

Thanks,

sai krishna.






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.