Why I can't find device used CCyUSBDevice

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

1.png

This is the test code.

when I didn't load the IMG the result is like this:

2.png

but when I loaded the IMG ,the reslut is like this:

3.png

4.png

This IMG can work!

Could you tell me why the empty it can find the device,instead the loading right IMG can't find device?

Thank you !

The console  code:

#include "stdafx.h"

#include <iostream>

using namespace std;

#include "CyAPI.h"

int _tmain(int argc, _TCHAR* argv[])

{

  CCyUSBDevice* pUSB = new CCyUSBDevice;

  int nDeviceCount = pUSB->DeviceCount();

  cout<<nDeviceCount<<endl;

  for (int nIdx = 0; nIdx < pUSB->DeviceCount(); nIdx++)

  {

  pUSB->Open(nIdx);

  printf("%s\n", pUSB->DeviceName);

  printf("%d\n", pUSB->VendorID);

  printf("%d\n", pUSB->ProductID);

  }

  getchar();

  return 0;

}

0 Likes
1 Solution
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello,

The IMG file that you have loaded complies to the UVC class and the device gets bound to the UVC driver. CyAPI library can only identify devices that are bound to the CYUSB3 driver.

Best regards,

Srinath S

View solution in original post

8 Replies