Your browser does not allow scripts
Please click here to view a static table of contents without scripts
Return to Introduction  Previous page  Next page
Send a cycle command to the USB port.

(FT_HANDLE ftHandle)

Handle of the device.

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

The effect of this function is the same as disconnecting then reconnecting the device from USB. Possible use of this function is in situations where a fatal error has occurred and it is difficult, or not possible, to recover without unplugging and replugging the USB cable. This function can also be used after re-programming the EEPROM to force the FTDI device to read the new EEPROM contents which previously required a physical disconnect-reconnect.

As the current session is not restored when the driver is reloaded, the application must be able to recover after calling this function.

Not available in Windows 98, Windows CE and Linux.

For FT2232C devices, FT_CyclePort will only work under Windows XP and later.


This example shows how to cycle the port.

FT_HANDLE ftHandle;   // valid handle returned from FT_OpenEx
FT_STATUS ftStatus;

ftStatus = FT_CyclePort(ftHandle);
if (ftStatus == FT_OK) {
   // Port has been cycled.
else {
   // FT_CyclePort FAILED!