Usage of SetXferSize in CyAPI.lib
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Answer:
SetXferSize is used in conjunction with the cyusb.sys driver to establish the transfer size. The need to set this is application dependent. Without setting a transfer size with SetXferSize the cyusb.sys driver will use a default transfer size of 8*packet size. An example of setting the transfer size to another value is:
ULONG xferSz = 1024 * 19
MyDevice->BulkInEndpt->SetXferSize(xferSz);
Selecting an Alternate Interface will cause the driver default transfer size to be used again so the developer will need to reset the transfer size again after selecting an Alternate Interface. The maximum value for SetXferSize is endpoint and OS dependent. However large values are not recommended, the recommended value for endpoints other than control endpoint is 64kB.
-
This widget could not be displayed.Anonymous