Your browser does not allow scripts
Please click here to view a static table of contents without scripts
FT_SetUSBParameters
Return to Introduction  Previous page  Next page
Set the USB request transfer size.

FT_STATUS
FT_SetUSBParameters
(FT_HANDLE ftHandle, DWORD dwInTransferSize, DWORD dwOutTransferSize)




Parameters
ftHandle
Handle of the device.
dwInTransferSize
Transfer size for USB IN request.
dwOutTransferSize
Transfer size for USB OUT request.




Return Value
FT_OK if successful, otherwise the return value is an FT error code.



Remarks
Previously, USB request transfer sizes have been set at 4096 bytes and have not been configurable. This function can be used to change the transfer sizes to better suit the application requirements. Transfer sizes must be set to a multiple of 64 bytes between 64 bytes and 64k bytes.

When FT_SetUSBParameters is called, the change comes into effect immediately and any data that was held in the driver at the time of the change is lost.

Note that, at present, only
dwInTransferSize is supported.



Example

HANDLE ftHandle; 
FT_STATUS ftStatus;
DWORD InTransferSize = 16384;

ftStatus = FT_Open(0, &ftHandle);
if(ftStatus != FT_OK) {
   // FT_Open failed
   return;
}

ftStatus = FT_SetUSBParameters(ftHandle, InTransferSize, 0);
if (ftStatus == FT_OK) {
  // In transfer size set to 16 Kbytes
}
else {
  // FT_SetUSBParameters FAILED!
}

FT_Close(ftHandle);