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:
inOvLap.hEvent = CreateEvent(NULL, false, false, "CYUSB_IN");
LONG length =1447680;
BulkInEpt=(CCyBulkEndPoint *) USBDevice->EndPoints;
UCHAR *inContext = BulkInEpt->BeginDataXfer(inBuf, length, &inOvLap);
BulkInEpt->FinishDataXfer(inBuf, length, &inOvLap,inContext);
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.