- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1,question about function "ept->Read(&buf, bytestosend);" in control transfer
after running the code “ept->Read(&buf, bytestosend);”,Has the transfer ended?
it's vital to know the answer in continous control transfer while repeated inquring a status variable through control transfer.
2,question about large bulk transfer
in a case that a DSP transmit an image to the host by using bulk transfer, the image has 1447680 bytes,so can the bulk transfer code be executable as below:
OVERLAPPED inOvLap;
inOvLap.hEvent = CreateEvent(NULL, false, false, "CYUSB_IN");
LONG length =1447680;
USBDevice->EndPointCount();
BulkInEpt=(CCyBulkEndPoint *) USBDevice->EndPoints[1];
UCHAR *inContext = BulkInEpt->BeginDataXfer(inBuf, length, &inOvLap);
BulkInEpt->WaitForXfer(&inOvLap,1000);
BulkInEpt->FinishDataXfer(inBuf, length, &inOvLap,inContext);
CloseHandle(inOvLap.hEvent);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. Yep. You will have to look at the returned bool value to see whether the transfer succeeded or failed.
2. Yep. It should work. The timeout value you are providing seems small.
Regards,
Anand