Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers

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



CyUSB.dll in MATLAB: problems at indexing a device_list
Moderator:
RSKV

Post Reply
Follow this topic



CyUSB.dll in MATLAB: problems at indexing a device_list

alermto posted on 17 Apr 2013 9:10 AM PST
Senior Member
14 Forum Posts

 Hi everybody, and thank you again for your help.

I managed loading the .NET CyUSB.dll library in MATLAB with the command NET.addAssembly.

Then, I also managed creating a list of devices, with:

devList = CyUSB.USBDeviceList(CyUSB.CyConst.DEVICES_CYUSB);

which is something like a MATLAB transposition of the C# code provided in the reference guide for the .dll.

The output demonstrates that a device has been found ( devList.Count outputs '1'), but I cannot access the first element of the list.

devList(0) is simply not allowed, and MATLAB itself suggests using an "Item" method. So if I use:

devList.Item(0) MATLAB crashes.

I'm pretty sure that this should be the procedure: devList.Item(1), for example, outputs an error saying that I went out of range. devList(1204, 4100), makes MATLAB crash again (note: those numbers are the decimal value of VID and PID of the connected device), while devList(whatever other couple of numbers) just outputs an empty string.

I didn't manage getting an error log from MATLAB.

Is there anything wrong with my approach? Is there a way to solve this issue? Somebody, a few time ago, posted a problem quite similar to mine, here in this forum (http://www.cypress.com/?app=forum&id=167&rID=48607) but I don't know if he managed to get it working.

Thank you very much for your help!

Alessandro







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.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20