cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

dilic_2635671
Contributor

Hi,

I am having trouble to using CCyControlEndPoint read/write for C++ console application on host. The code actually from Cypress library document. The FX3 firmware is the UsbSpiDmaMode sample code.

My issue is the ept->Write/Read function always return false. I also tried on Control Center C# code, it returns true.

Anything I might have done wrong?

   CCyControlEndPoint *ept = USBDevice->ControlEndPt;

   bool bXferCompleted = false;

   //  Just for typing efficiency

   ept->Target = TGT_DEVICE;

   ept->ReqType = REQ_VENDOR;

   ept->ReqCode = 0x07;

   ept->Value = 1;

   ept->Index = 0;

   unsigned char  buf[512];

   ZeroMemory(buf, 512);

   LONG bytesToSend = 128;

   bXferCompleted = ept->Write(buf, bytesToSend);

Thanks,

Dick

0 Likes
1 Solution
dilic_2635671
Contributor

Never mind, I got it.

I have debug port USB-to-Serial cable connected as well. So there are more than 1 Cypress USB devices. Thx

View solution in original post

0 Likes
1 Reply
dilic_2635671
Contributor

Never mind, I got it.

I have debug port USB-to-Serial cable connected as well. So there are more than 1 Cypress USB devices. Thx

View solution in original post

0 Likes