DirectOutput
DirectOutput framework R2 for virtual pinball cabinets.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros Pages
DirectOutput.Cab.Out.FTDIChip.FTDI Class Reference

Class wrapper for FTD2XX.DLL More...

Classes

class  FT2232_EEPROM_STRUCTURE
 EEPROM structure specific to FT2232 devices. Inherits from FT_EEPROM_DATA. More...
 
class  FT2232H_EEPROM_STRUCTURE
 EEPROM structure specific to FT2232H devices. Inherits from FT_EEPROM_DATA. More...
 
class  FT232B_EEPROM_STRUCTURE
 EEPROM structure specific to FT232B and FT245B devices. Inherits from FT_EEPROM_DATA. More...
 
class  FT232H_EEPROM_STRUCTURE
 EEPROM structure specific to FT232H devices. Inherits from FT_EEPROM_DATA. More...
 
class  FT232R_EEPROM_STRUCTURE
 EEPROM structure specific to FT232R and FT245R devices. Inherits from FT_EEPROM_DATA. More...
 
class  FT4232H_EEPROM_STRUCTURE
 EEPROM structure specific to FT4232H devices. Inherits from FT_EEPROM_DATA. More...
 
class  FT_232H_CBUS_OPTIONS
 Available functions for the FT232H CBUS pins. Controlled by FT232H EEPROM settings More...
 
class  FT_BIT_MODES
 Permitted bit mode values for FTDI devices. For use with SetBitMode More...
 
class  FT_CBUS_OPTIONS
 Available functions for the FT232R CBUS pins. Controlled by FT232R EEPROM settings More...
 
class  FT_DATA_BITS
 Permitted data bits for FTDI devices More...
 
class  FT_DEVICE_INFO_NODE
 Type that holds device information for GetDeviceInformation method. Used with FT_GetDeviceInfo and FT_GetDeviceInfoDetail in FTD2XX.DLL More...
 
class  FT_DRIVE_CURRENT
 Valid values for drive current options on FT2232H, FT4232H and FT232H devices. More...
 
class  FT_EEPROM_DATA
 Common EEPROM elements for all devices. Inherited to specific device type EEPROMs. More...
 
class  FT_EVENTS
 FTDI device event types that can be monitored More...
 
class  FT_EXCEPTION
 Exceptions thrown by errors within the FTDI class. More...
 
class  FT_FLAGS
 Flags that provide information on the FTDI device state More...
 
class  FT_FLOW_CONTROL
 Permitted flow control values for FTDI devices More...
 
class  FT_LINE_STATUS
 Line status bit definitions More...
 
class  FT_MODEM_STATUS
 Modem status bit definitions More...
 
class  FT_PARITY
 Permitted parity values for FTDI devices More...
 
class  FT_PURGE
 Purge buffer constant definitions More...
 
class  FT_STOP_BITS
 Permitted stop bits for FTDI devices More...
 
class  FT_XSERIES_CBUS_OPTIONS
 Available functions for the X-Series CBUS pins. Controlled by X-Series EEPROM settings More...
 
class  FT_XSERIES_EEPROM_STRUCTURE
 EEPROM structure specific to X-Series devices. Inherits from FT_EEPROM_DATA. More...
 

Public Types

enum  FT_STATUS {
  FT_OK = 0, FT_INVALID_HANDLE, FT_DEVICE_NOT_FOUND, FT_DEVICE_NOT_OPENED,
  FT_IO_ERROR, FT_INSUFFICIENT_RESOURCES, FT_INVALID_PARAMETER, FT_INVALID_BAUD_RATE,
  FT_DEVICE_NOT_OPENED_FOR_ERASE, FT_DEVICE_NOT_OPENED_FOR_WRITE, FT_FAILED_TO_WRITE_DEVICE, FT_EEPROM_READ_FAILED,
  FT_EEPROM_WRITE_FAILED, FT_EEPROM_ERASE_FAILED, FT_EEPROM_NOT_PRESENT, FT_EEPROM_NOT_PROGRAMMED,
  FT_INVALID_ARGS, FT_OTHER_ERROR
}
 Status values for FTDI devices. More...
 
enum  FT_DEVICE {
  FT_DEVICE_BM = 0, FT_DEVICE_AM, FT_DEVICE_100AX, FT_DEVICE_UNKNOWN,
  FT_DEVICE_2232, FT_DEVICE_232R, FT_DEVICE_2232H, FT_DEVICE_4232H,
  FT_DEVICE_232H, FT_DEVICE_X_SERIES
}
 List of FTDI device types More...
 

Public Member Functions

 FTDI ()
 Constructor for the FTDI class. More...
 
FT_STATUS GetNumberOfDevices (ref UInt32 devcount)
 Gets the number of FTDI devices available. More...
 
FT_STATUS GetDeviceList (FT_DEVICE_INFO_NODE[] devicelist)
 Gets information on all of the FTDI devices available. More...
 
FT_STATUS OpenByIndex (UInt32 index)
 Opens the FTDI device with the specified index. More...
 
FT_STATUS OpenBySerialNumber (string serialnumber)
 Opens the FTDI device with the specified serial number. More...
 
FT_STATUS OpenByDescription (string description)
 Opens the FTDI device with the specified description. More...
 
FT_STATUS OpenByLocation (UInt32 location)
 Opens the FTDI device at the specified physical location. More...
 
FT_STATUS Close ()
 Closes the handle to an open FTDI device. More...
 
FT_STATUS Read (byte[] dataBuffer, UInt32 numBytesToRead, ref UInt32 numBytesRead)
 Read data from an open FTDI device. More...
 
FT_STATUS Read (out string dataBuffer, UInt32 numBytesToRead, ref UInt32 numBytesRead)
 Read data from an open FTDI device. More...
 
FT_STATUS Write (byte[] dataBuffer, Int32 numBytesToWrite, ref UInt32 numBytesWritten)
 Write data to an open FTDI device. More...
 
FT_STATUS Write (byte[] dataBuffer, UInt32 numBytesToWrite, ref UInt32 numBytesWritten)
 Write data to an open FTDI device. More...
 
FT_STATUS Write (string dataBuffer, Int32 numBytesToWrite, ref UInt32 numBytesWritten)
 Write data to an open FTDI device. More...
 
FT_STATUS Write (string dataBuffer, UInt32 numBytesToWrite, ref UInt32 numBytesWritten)
 Write data to an open FTDI device. More...
 
FT_STATUS ResetDevice ()
 Reset an open FTDI device. More...
 
FT_STATUS Purge (UInt32 purgemask)
 Purge data from the devices transmit and/or receive buffers. More...
 
FT_STATUS StopInTask ()
 Stops the driver issuing USB in requests. More...
 
FT_STATUS RestartInTask ()
 Resumes the driver issuing USB in requests. More...
 
FT_STATUS ResetPort ()
 Resets the device port. More...
 
FT_STATUS CyclePort ()
 Causes the device to be re-enumerated on the USB bus. This is equivalent to unplugging and replugging the device. Also calls FT_Close if FT_CyclePort is successful, so no need to call this separately in the application. More...
 
FT_STATUS Rescan ()
 Causes the system to check for USB hardware changes. This is equivalent to clicking on the "Scan for hardware changes" button in the Device Manager. More...
 
FT_STATUS Reload (UInt16 VendorID, UInt16 ProductID)
 Forces a reload of the driver for devices with a specific VID and PID combination. More...
 
FT_STATUS SetBitMode (byte Mask, byte BitMode)
 Puts the device in a mode other than the default UART or FIFO mode. More...
 
FT_STATUS GetPinStates (ref byte BitMode)
 Gets the instantaneous state of the device IO pins. More...
 
FT_STATUS ReadEEPROMLocation (UInt32 Address, ref UInt16 EEValue)
 Reads an individual word value from a specified location in the device's EEPROM. More...
 
FT_STATUS WriteEEPROMLocation (UInt32 Address, UInt16 EEValue)
 Writes an individual word value to a specified location in the device's EEPROM. More...
 
FT_STATUS EraseEEPROM ()
 Erases the device EEPROM. More...
 
FT_STATUS ReadFT232BEEPROM (FT232B_EEPROM_STRUCTURE ee232b)
 Reads the EEPROM contents of an FT232B or FT245B device. More...
 
FT_STATUS ReadFT2232EEPROM (FT2232_EEPROM_STRUCTURE ee2232)
 Reads the EEPROM contents of an FT2232 device. More...
 
FT_STATUS ReadFT232REEPROM (FT232R_EEPROM_STRUCTURE ee232r)
 Reads the EEPROM contents of an FT232R or FT245R device. Calls FT_EE_Read in FTD2XX DLL More...
 
FT_STATUS ReadFT2232HEEPROM (FT2232H_EEPROM_STRUCTURE ee2232h)
 Reads the EEPROM contents of an FT2232H device. More...
 
FT_STATUS ReadFT4232HEEPROM (FT4232H_EEPROM_STRUCTURE ee4232h)
 Reads the EEPROM contents of an FT4232H device. More...
 
FT_STATUS ReadFT232HEEPROM (FT232H_EEPROM_STRUCTURE ee232h)
 Reads the EEPROM contents of an FT232H device. More...
 
FT_STATUS ReadXSeriesEEPROM (FT_XSERIES_EEPROM_STRUCTURE eeX)
 Reads the EEPROM contents of an X-Series device. More...
 
FT_STATUS WriteFT232BEEPROM (FT232B_EEPROM_STRUCTURE ee232b)
 Writes the specified values to the EEPROM of an FT232B or FT245B device. More...
 
FT_STATUS WriteFT2232EEPROM (FT2232_EEPROM_STRUCTURE ee2232)
 Writes the specified values to the EEPROM of an FT2232 device. Calls FT_EE_Program in FTD2XX DLL More...
 
FT_STATUS WriteFT232REEPROM (FT232R_EEPROM_STRUCTURE ee232r)
 Writes the specified values to the EEPROM of an FT232R or FT245R device. Calls FT_EE_Program in FTD2XX DLL More...
 
FT_STATUS WriteFT2232HEEPROM (FT2232H_EEPROM_STRUCTURE ee2232h)
 Writes the specified values to the EEPROM of an FT2232H device. Calls FT_EE_Program in FTD2XX DLL More...
 
FT_STATUS WriteFT4232HEEPROM (FT4232H_EEPROM_STRUCTURE ee4232h)
 Writes the specified values to the EEPROM of an FT4232H device. Calls FT_EE_Program in FTD2XX DLL More...
 
FT_STATUS WriteFT232HEEPROM (FT232H_EEPROM_STRUCTURE ee232h)
 Writes the specified values to the EEPROM of an FT232H device. Calls FT_EE_Program in FTD2XX DLL More...
 
FT_STATUS WriteXSeriesEEPROM (FT_XSERIES_EEPROM_STRUCTURE eeX)
 Writes the specified values to the EEPROM of an X-Series device. Calls FT_EEPROM_Program in FTD2XX DLL More...
 
FT_STATUS EEReadUserArea (byte[] UserAreaDataBuffer, ref UInt32 numBytesRead)
 Reads data from the user area of the device EEPROM. More...
 
FT_STATUS EEWriteUserArea (byte[] UserAreaDataBuffer)
 Writes data to the user area of the device EEPROM. More...
 
FT_STATUS GetDeviceType (ref FT_DEVICE DeviceType)
 Gets the chip type of the current device. More...
 
FT_STATUS GetDeviceID (ref UInt32 DeviceID)
 Gets the Vendor ID and Product ID of the current device. More...
 
FT_STATUS GetDescription (out string Description)
 Gets the description of the current device. More...
 
FT_STATUS GetSerialNumber (out string SerialNumber)
 Gets the serial number of the current device. More...
 
FT_STATUS GetRxBytesAvailable (ref UInt32 RxQueue)
 Gets the number of bytes available in the receive buffer. More...
 
FT_STATUS GetTxBytesWaiting (ref UInt32 TxQueue)
 Gets the number of bytes waiting in the transmit buffer. More...
 
FT_STATUS GetEventType (ref UInt32 EventType)
 Gets the event type after an event has fired. Can be used to distinguish which event has been triggered when waiting on multiple event types. More...
 
FT_STATUS GetModemStatus (ref byte ModemStatus)
 Gets the current modem status. More...
 
FT_STATUS GetLineStatus (ref byte LineStatus)
 Gets the current line status. More...
 
FT_STATUS SetBaudRate (UInt32 BaudRate)
 Sets the current Baud rate. More...
 
FT_STATUS SetDataCharacteristics (byte DataBits, byte StopBits, byte Parity)
 Sets the data bits, stop bits and parity for the device. More...
 
FT_STATUS SetFlowControl (UInt16 FlowControl, byte Xon, byte Xoff)
 Sets the flow control type. More...
 
FT_STATUS SetRTS (bool Enable)
 Asserts or de-asserts the Request To Send (RTS) line. More...
 
FT_STATUS SetDTR (bool Enable)
 Asserts or de-asserts the Data Terminal Ready (DTR) line. More...
 
FT_STATUS SetTimeouts (UInt32 ReadTimeout, UInt32 WriteTimeout)
 Sets the read and write timeout values. More...
 
FT_STATUS SetBreak (bool Enable)
 Sets or clears the break state. More...
 
FT_STATUS SetResetPipeRetryCount (UInt32 ResetPipeRetryCount)
 Gets or sets the reset pipe retry count. Default value is 50. More...
 
FT_STATUS GetDriverVersion (ref UInt32 DriverVersion)
 Gets the current FTDIBUS.SYS driver version number. More...
 
FT_STATUS GetLibraryVersion (ref UInt32 LibraryVersion)
 Gets the current FTD2XX.DLL driver version number. More...
 
FT_STATUS SetDeadmanTimeout (UInt32 DeadmanTimeout)
 Sets the USB deadman timeout value. Default is 5000ms. More...
 
FT_STATUS SetLatency (byte Latency)
 Sets the value of the latency timer. Default value is 16ms. More...
 
FT_STATUS GetLatency (ref byte Latency)
 Gets the value of the latency timer. Default value is 16ms. More...
 
FT_STATUS InTransferSize (UInt32 InTransferSize)
 Sets the USB IN and OUT transfer sizes. More...
 
FT_STATUS SetCharacters (byte EventChar, bool EventCharEnable, byte ErrorChar, bool ErrorCharEnable)
 Sets an event character, an error character and enables or disables them. More...
 
FT_STATUS EEUserAreaSize (ref UInt32 UASize)
 Gets the size of the EEPROM user area. More...
 
FT_STATUS GetCOMPort (out string ComPortName)
 Gets the corresponding COM port number for the current device. If no COM port is exposed, an empty string is returned. More...
 
void ErrorHandler (FT_STATUS ftStatus)
 

Properties

bool IsOpen [get]
 Gets the open status of the device. More...
 

Events

EventHandler< EventArgs > CharReceived
 Occurs when the FDTI devices receives a byte. More...
 

Detailed Description

Class wrapper for FTD2XX.DLL

Member Enumeration Documentation

List of FTDI device types

Enumerator
FT_DEVICE_BM 

FT232B or FT245B device

FT_DEVICE_AM 

FT8U232AM or FT8U245AM device

FT_DEVICE_100AX 

FT8U100AX device

FT_DEVICE_UNKNOWN 

Unknown device

FT_DEVICE_2232 

FT2232 device

FT_DEVICE_232R 

FT232R or FT245R device

FT_DEVICE_2232H 

FT2232H device

FT_DEVICE_4232H 

FT4232H device

FT_DEVICE_232H 

FT232H device

FT_DEVICE_X_SERIES 

FT232X device

Status values for FTDI devices.

Enumerator
FT_OK 

Status OK

FT_INVALID_HANDLE 

The device handle is invalid

FT_DEVICE_NOT_FOUND 

Device not found

FT_DEVICE_NOT_OPENED 

Device is not open

FT_IO_ERROR 

IO error

FT_INSUFFICIENT_RESOURCES 

Insufficient resources

FT_INVALID_PARAMETER 

A parameter was invalid

FT_INVALID_BAUD_RATE 

The requested baud rate is invalid

FT_DEVICE_NOT_OPENED_FOR_ERASE 

Device not opened for erase

FT_DEVICE_NOT_OPENED_FOR_WRITE 

Device not poened for write

FT_FAILED_TO_WRITE_DEVICE 

Failed to write to device

FT_EEPROM_READ_FAILED 

Failed to read the device EEPROM

FT_EEPROM_WRITE_FAILED 

Failed to write the device EEPROM

FT_EEPROM_ERASE_FAILED 

Failed to erase the device EEPROM

FT_EEPROM_NOT_PRESENT 

An EEPROM is not fitted to the device

FT_EEPROM_NOT_PROGRAMMED 

Device EEPROM is blank

FT_INVALID_ARGS 

Invalid arguments

FT_OTHER_ERROR 

An other error has occurred

Constructor & Destructor Documentation

DirectOutput.Cab.Out.FTDIChip.FTDI.FTDI ( )

Constructor for the FTDI class.

Member Function Documentation

FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.Close ( )

Closes the handle to an open FTDI device.

Returns
FT_STATUS value from FT_Close in FTD2XX.DLL
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.CyclePort ( )

Causes the device to be re-enumerated on the USB bus. This is equivalent to unplugging and replugging the device. Also calls FT_Close if FT_CyclePort is successful, so no need to call this separately in the application.

Returns
FT_STATUS value from FT_CyclePort in FTD2XX.DLL
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.EEReadUserArea ( byte[]  UserAreaDataBuffer,
ref UInt32  numBytesRead 
)

Reads data from the user area of the device EEPROM.

Returns
FT_STATUS from FT_UARead in FTD2XX.DLL
Parameters
UserAreaDataBufferAn array of bytes which will be populated with the data read from the device EEPROM user area.
numBytesReadThe number of bytes actually read from the EEPROM user area.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.EEUserAreaSize ( ref UInt32  UASize)

Gets the size of the EEPROM user area.

Returns
FT_STATUS value from FT_EE_UASize in FTD2XX.DLL
Parameters
UASizeThe EEPROM user area size in bytes.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.EEWriteUserArea ( byte[]  UserAreaDataBuffer)

Writes data to the user area of the device EEPROM.

Returns
FT_STATUS value from FT_UAWrite in FTD2XX.DLL
Parameters
UserAreaDataBufferAn array of bytes which will be written to the device EEPROM user area.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.EraseEEPROM ( )

Erases the device EEPROM.

Returns
FT_STATUS value from FT_EraseEE in FTD2XX.DLL
Exceptions
FT_EXCEPTIONThrown when attempting to erase the EEPROM of a device with an internal EEPROM such as an FT232R or FT245R.
void DirectOutput.Cab.Out.FTDIChip.FTDI.ErrorHandler ( FT_STATUS  ftStatus)
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.GetCOMPort ( out string  ComPortName)

Gets the corresponding COM port number for the current device. If no COM port is exposed, an empty string is returned.

Returns
FT_STATUS value from FT_GetComPortNumber in FTD2XX.DLL
Parameters
ComPortNameThe COM port name corresponding to the current device. If no COM port is installed, an empty string is passed back.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.GetDescription ( out string  Description)

Gets the description of the current device.

Returns
FT_STATUS value from FT_GetDeviceInfo in FTD2XX.DLL
Parameters
DescriptionThe description of the current device.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.GetDeviceID ( ref UInt32  DeviceID)

Gets the Vendor ID and Product ID of the current device.

Returns
FT_STATUS value from FT_GetDeviceInfo in FTD2XX.DLL
Parameters
DeviceIDThe device ID (Vendor ID and Product ID) of the current device.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.GetDeviceList ( FT_DEVICE_INFO_NODE[]  devicelist)

Gets information on all of the FTDI devices available.

Returns
FT_STATUS value from FT_GetDeviceInfoDetail in FTD2XX.DLL
Parameters
devicelistAn array of type FT_DEVICE_INFO_NODE to contain the device information for all available devices.
Exceptions
FT_EXCEPTIONThrown when the supplied buffer is not large enough to contain the device info list.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.GetDeviceType ( ref FT_DEVICE  DeviceType)

Gets the chip type of the current device.

Returns
FT_STATUS value from FT_GetDeviceInfo in FTD2XX.DLL
Parameters
DeviceTypeThe FTDI chip type of the current device.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.GetDriverVersion ( ref UInt32  DriverVersion)

Gets the current FTDIBUS.SYS driver version number.

Returns
FT_STATUS value from FT_GetDriverVersion in FTD2XX.DLL
Parameters
DriverVersionThe current driver version number.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.GetEventType ( ref UInt32  EventType)

Gets the event type after an event has fired. Can be used to distinguish which event has been triggered when waiting on multiple event types.

Returns
FT_STATUS value from FT_GetStatus in FTD2XX.DLL
Parameters
EventTypeThe type of event that has occurred.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.GetLatency ( ref byte  Latency)

Gets the value of the latency timer. Default value is 16ms.

Returns
FT_STATUS value from FT_GetLatencyTimer in FTD2XX.DLL
Parameters
LatencyThe latency timer value in ms.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.GetLibraryVersion ( ref UInt32  LibraryVersion)

Gets the current FTD2XX.DLL driver version number.

Returns
FT_STATUS value from FT_GetLibraryVersion in FTD2XX.DLL
Parameters
LibraryVersionThe current library version.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.GetLineStatus ( ref byte  LineStatus)

Gets the current line status.

Returns
FT_STATUS value from FT_GetModemStatus in FTD2XX.DLL
Parameters
LineStatusA bit map representaion of the current line status.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.GetModemStatus ( ref byte  ModemStatus)

Gets the current modem status.

Returns
FT_STATUS value from FT_GetModemStatus in FTD2XX.DLL
Parameters
ModemStatusA bit map representaion of the current modem status.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.GetNumberOfDevices ( ref UInt32  devcount)

Gets the number of FTDI devices available.

Returns
FT_STATUS value from FT_CreateDeviceInfoList in FTD2XX.DLL
Parameters
devcountThe number of FTDI devices available.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.GetPinStates ( ref byte  BitMode)

Gets the instantaneous state of the device IO pins.

Returns
FT_STATUS value from FT_GetBitMode in FTD2XX.DLL
Parameters
BitModeA bitmap value containing the instantaneous state of the device IO pins
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.GetRxBytesAvailable ( ref UInt32  RxQueue)

Gets the number of bytes available in the receive buffer.

Returns
FT_STATUS value from FT_GetQueueStatus in FTD2XX.DLL
Parameters
RxQueueThe number of bytes available to be read.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.GetSerialNumber ( out string  SerialNumber)

Gets the serial number of the current device.

Returns
FT_STATUS value from FT_GetDeviceInfo in FTD2XX.DLL
Parameters
SerialNumberThe serial number of the current device.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.GetTxBytesWaiting ( ref UInt32  TxQueue)

Gets the number of bytes waiting in the transmit buffer.

Returns
FT_STATUS value from FT_GetStatus in FTD2XX.DLL
Parameters
TxQueueThe number of bytes waiting to be sent.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.InTransferSize ( UInt32  InTransferSize)

Sets the USB IN and OUT transfer sizes.

Returns
FT_STATUS value from FT_SetUSBParameters in FTD2XX.DLL
Parameters
InTransferSizeThe USB IN transfer size in bytes.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.OpenByDescription ( string  description)

Opens the FTDI device with the specified description.

Returns
FT_STATUS value from FT_OpenEx in FTD2XX.DLL
Parameters
descriptionDescription of the device to open.
Remarks
Initialises the device to 8 data bits, 1 stop bit, no parity, no flow control and 9600 Baud.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.OpenByIndex ( UInt32  index)

Opens the FTDI device with the specified index.

Returns
FT_STATUS value from FT_Open in FTD2XX.DLL
Parameters
indexIndex of the device to open. Note that this cannot be guaranteed to open a specific device.
Remarks
Initialises the device to 8 data bits, 1 stop bit, no parity, no flow control and 9600 Baud.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.OpenByLocation ( UInt32  location)

Opens the FTDI device at the specified physical location.

Returns
FT_STATUS value from FT_OpenEx in FTD2XX.DLL
Parameters
locationLocation of the device to open.
Remarks
Initialises the device to 8 data bits, 1 stop bit, no parity, no flow control and 9600 Baud.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.OpenBySerialNumber ( string  serialnumber)

Opens the FTDI device with the specified serial number.

Returns
FT_STATUS value from FT_OpenEx in FTD2XX.DLL
Parameters
serialnumberSerial number of the device to open.
Remarks
Initialises the device to 8 data bits, 1 stop bit, no parity, no flow control and 9600 Baud.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.Purge ( UInt32  purgemask)

Purge data from the devices transmit and/or receive buffers.

Returns
FT_STATUS value from FT_Purge in FTD2XX.DLL
Parameters
purgemaskSpecifies which buffer(s) to be purged. Valid values are any combination of the following flags: FT_PURGE_RX, FT_PURGE_TX
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.Read ( byte[]  dataBuffer,
UInt32  numBytesToRead,
ref UInt32  numBytesRead 
)

Read data from an open FTDI device.

Returns
FT_STATUS value from FT_Read in FTD2XX.DLL
Parameters
dataBufferAn array of bytes which will be populated with the data read from the device.
numBytesToReadThe number of bytes requested from the device.
numBytesReadThe number of bytes actually read.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.Read ( out string  dataBuffer,
UInt32  numBytesToRead,
ref UInt32  numBytesRead 
)

Read data from an open FTDI device.

Returns
FT_STATUS value from FT_Read in FTD2XX.DLL
Parameters
dataBufferA string containing the data read
numBytesToReadThe number of bytes requested from the device.
numBytesReadThe number of bytes actually read.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.ReadEEPROMLocation ( UInt32  Address,
ref UInt16  EEValue 
)

Reads an individual word value from a specified location in the device's EEPROM.

Returns
FT_STATUS value from FT_ReadEE in FTD2XX.DLL
Parameters
AddressThe EEPROM location to read data from
EEValueThe WORD value read from the EEPROM location specified in the Address paramter
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.ReadFT2232EEPROM ( FT2232_EEPROM_STRUCTURE  ee2232)

Reads the EEPROM contents of an FT2232 device.

Returns
FT_STATUS value from FT_EE_Read in FTD2XX DLL
Parameters
ee2232An FT2232_EEPROM_STRUCTURE which contains only the relevant information for an FT2232 device.
Exceptions
FT_EXCEPTIONThrown when the current device does not match the type required by this method.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.ReadFT2232HEEPROM ( FT2232H_EEPROM_STRUCTURE  ee2232h)

Reads the EEPROM contents of an FT2232H device.

Returns
FT_STATUS value from FT_EE_Read in FTD2XX DLL
Parameters
ee2232hAn FT2232H_EEPROM_STRUCTURE which contains only the relevant information for an FT2232H device.
Exceptions
FT_EXCEPTIONThrown when the current device does not match the type required by this method.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.ReadFT232BEEPROM ( FT232B_EEPROM_STRUCTURE  ee232b)

Reads the EEPROM contents of an FT232B or FT245B device.

Returns
FT_STATUS value from FT_EE_Read in FTD2XX DLL
Parameters
ee232bAn FT232B_EEPROM_STRUCTURE which contains only the relevant information for an FT232B and FT245B device.
Exceptions
FT_EXCEPTIONThrown when the current device does not match the type required by this method.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.ReadFT232HEEPROM ( FT232H_EEPROM_STRUCTURE  ee232h)

Reads the EEPROM contents of an FT232H device.

Returns
FT_STATUS value from FT_EE_Read in FTD2XX DLL
Parameters
ee232hAn FT232H_EEPROM_STRUCTURE which contains only the relevant information for an FT232H device.
Exceptions
FT_EXCEPTIONThrown when the current device does not match the type required by this method.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.ReadFT232REEPROM ( FT232R_EEPROM_STRUCTURE  ee232r)

Reads the EEPROM contents of an FT232R or FT245R device. Calls FT_EE_Read in FTD2XX DLL

Returns
An FT232R_EEPROM_STRUCTURE which contains only the relevant information for an FT232R and FT245R device.
Exceptions
FT_EXCEPTIONThrown when the current device does not match the type required by this method.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.ReadFT4232HEEPROM ( FT4232H_EEPROM_STRUCTURE  ee4232h)

Reads the EEPROM contents of an FT4232H device.

Returns
FT_STATUS value from FT_EE_Read in FTD2XX DLL
Parameters
ee4232hAn FT4232H_EEPROM_STRUCTURE which contains only the relevant information for an FT4232H device.
Exceptions
FT_EXCEPTIONThrown when the current device does not match the type required by this method.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.ReadXSeriesEEPROM ( FT_XSERIES_EEPROM_STRUCTURE  eeX)

Reads the EEPROM contents of an X-Series device.

Returns
FT_STATUS value from FT_EEPROM_Read in FTD2XX DLL
Parameters
eeXAn FT_XSERIES_EEPROM_STRUCTURE which contains only the relevant information for an X-Series device.
Exceptions
FT_EXCEPTIONThrown when the current device does not match the type required by this method.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.Reload ( UInt16  VendorID,
UInt16  ProductID 
)

Forces a reload of the driver for devices with a specific VID and PID combination.

Returns
FT_STATUS value from FT_Reload in FTD2XX.DLL
Remarks
If the VID and PID parameters are 0, the drivers for USB root hubs will be reloaded, causing all USB devices connected to reload their drivers
Parameters
VendorIDVendor ID of the devices to have the driver reloaded
ProductIDProduct ID of the devices to have the driver reloaded
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.Rescan ( )

Causes the system to check for USB hardware changes. This is equivalent to clicking on the "Scan for hardware changes" button in the Device Manager.

Returns
FT_STATUS value from FT_Rescan in FTD2XX.DLL
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.ResetDevice ( )

Reset an open FTDI device.

Returns
FT_STATUS value from FT_ResetDevice in FTD2XX.DLL
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.ResetPort ( )

Resets the device port.

Returns
FT_STATUS value from FT_ResetPort in FTD2XX.DLL
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.RestartInTask ( )

Resumes the driver issuing USB in requests.

Returns
FT_STATUS value from FT_RestartInTask in FTD2XX.DLL
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.SetBaudRate ( UInt32  BaudRate)

Sets the current Baud rate.

Returns
FT_STATUS value from FT_SetBaudRate in FTD2XX.DLL
Parameters
BaudRateThe desired Baud rate for the device.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.SetBitMode ( byte  Mask,
byte  BitMode 
)

Puts the device in a mode other than the default UART or FIFO mode.

Returns
FT_STATUS value from FT_SetBitMode in FTD2XX.DLL
Parameters
MaskSets up which bits are inputs and which are outputs. A bit value of 0 sets the corresponding pin to an input, a bit value of 1 sets the corresponding pin to an output. In the case of CBUS Bit Bang, the upper nibble of this value controls which pins are inputs and outputs, while the lower nibble controls which of the outputs are high and low.
BitModeFor FT232H devices, valid values are FT_BIT_MODE_RESET, FT_BIT_MODE_ASYNC_BITBANG, FT_BIT_MODE_MPSSE, FT_BIT_MODE_SYNC_BITBANG, FT_BIT_MODE_CBUS_BITBANG, FT_BIT_MODE_MCU_HOST, FT_BIT_MODE_FAST_SERIAL, FT_BIT_MODE_SYNC_FIFO. For FT2232H devices, valid values are FT_BIT_MODE_RESET, FT_BIT_MODE_ASYNC_BITBANG, FT_BIT_MODE_MPSSE, FT_BIT_MODE_SYNC_BITBANG, FT_BIT_MODE_MCU_HOST, FT_BIT_MODE_FAST_SERIAL, FT_BIT_MODE_SYNC_FIFO. For FT4232H devices, valid values are FT_BIT_MODE_RESET, FT_BIT_MODE_ASYNC_BITBANG, FT_BIT_MODE_MPSSE, FT_BIT_MODE_SYNC_BITBANG. For FT232R devices, valid values are FT_BIT_MODE_RESET, FT_BIT_MODE_ASYNC_BITBANG, FT_BIT_MODE_SYNC_BITBANG, FT_BIT_MODE_CBUS_BITBANG. For FT245R devices, valid values are FT_BIT_MODE_RESET, FT_BIT_MODE_ASYNC_BITBANG, FT_BIT_MODE_SYNC_BITBANG. For FT2232 devices, valid values are FT_BIT_MODE_RESET, FT_BIT_MODE_ASYNC_BITBANG, FT_BIT_MODE_MPSSE, FT_BIT_MODE_SYNC_BITBANG, FT_BIT_MODE_MCU_HOST, FT_BIT_MODE_FAST_SERIAL. For FT232B and FT245B devices, valid values are FT_BIT_MODE_RESET, FT_BIT_MODE_ASYNC_BITBANG.
Exceptions
FT_EXCEPTIONThrown when the current device does not support the requested bit mode.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.SetBreak ( bool  Enable)

Sets or clears the break state.

Returns
FT_STATUS value from FT_SetBreakOn or FT_SetBreakOff in FTD2XX.DLL
Parameters
EnableIf true, sets break on. If false, sets break off.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.SetCharacters ( byte  EventChar,
bool  EventCharEnable,
byte  ErrorChar,
bool  ErrorCharEnable 
)

Sets an event character, an error character and enables or disables them.

Returns
FT_STATUS value from FT_SetChars in FTD2XX.DLL
Parameters
EventCharA character that will be tigger an IN to the host when this character is received.
EventCharEnableDetermines if the EventChar is enabled or disabled.
ErrorCharA character that will be inserted into the data stream to indicate that an error has occurred.
ErrorCharEnableDetermines if the ErrorChar is enabled or disabled.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.SetDataCharacteristics ( byte  DataBits,
byte  StopBits,
byte  Parity 
)

Sets the data bits, stop bits and parity for the device.

Returns
FT_STATUS value from FT_SetDataCharacteristics in FTD2XX.DLL
Parameters
DataBitsThe number of data bits for UART data. Valid values are FT_DATA_BITS.FT_DATA_7 or FT_DATA_BITS.FT_BITS_8
StopBitsThe number of stop bits for UART data. Valid values are FT_STOP_BITS.FT_STOP_BITS_1 or FT_STOP_BITS.FT_STOP_BITS_2
ParityThe parity of the UART data. Valid values are FT_PARITY.FT_PARITY_NONE, FT_PARITY.FT_PARITY_ODD, FT_PARITY.FT_PARITY_EVEN, FT_PARITY.FT_PARITY_MARK or FT_PARITY.FT_PARITY_SPACE
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.SetDeadmanTimeout ( UInt32  DeadmanTimeout)

Sets the USB deadman timeout value. Default is 5000ms.

Returns
FT_STATUS value from FT_SetDeadmanTimeout in FTD2XX.DLL
Parameters
DeadmanTimeoutThe deadman timeout value in ms. Default is 5000ms.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.SetDTR ( bool  Enable)

Asserts or de-asserts the Data Terminal Ready (DTR) line.

Returns
FT_STATUS value from FT_SetDtr or FT_ClrDtr in FTD2XX.DLL
Parameters
EnableIf true, asserts DTR. If false, de-asserts DTR.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.SetFlowControl ( UInt16  FlowControl,
byte  Xon,
byte  Xoff 
)

Sets the flow control type.

Returns
FT_STATUS value from FT_SetFlowControl in FTD2XX.DLL
Parameters
FlowControlThe type of flow control for the UART. Valid values are FT_FLOW_CONTROL.FT_FLOW_NONE, FT_FLOW_CONTROL.FT_FLOW_RTS_CTS, FT_FLOW_CONTROL.FT_FLOW_DTR_DSR or FT_FLOW_CONTROL.FT_FLOW_XON_XOFF
XonThe Xon character for Xon/Xoff flow control. Ignored if not using Xon/XOff flow control.
XoffThe Xoff character for Xon/Xoff flow control. Ignored if not using Xon/XOff flow control.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.SetLatency ( byte  Latency)

Sets the value of the latency timer. Default value is 16ms.

Returns
FT_STATUS value from FT_SetLatencyTimer in FTD2XX.DLL
Parameters
LatencyThe latency timer value in ms. Valid values are 2ms - 255ms for FT232BM, FT245BM and FT2232 devices. Valid values are 0ms - 255ms for other devices.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.SetResetPipeRetryCount ( UInt32  ResetPipeRetryCount)

Gets or sets the reset pipe retry count. Default value is 50.

Returns
FT_STATUS vlaue from FT_SetResetPipeRetryCount in FTD2XX.DLL
Parameters
ResetPipeRetryCountThe reset pipe retry count. Electrically noisy environments may benefit from a larger value.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.SetRTS ( bool  Enable)

Asserts or de-asserts the Request To Send (RTS) line.

Returns
FT_STATUS value from FT_SetRts or FT_ClrRts in FTD2XX.DLL
Parameters
EnableIf true, asserts RTS. If false, de-asserts RTS
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.SetTimeouts ( UInt32  ReadTimeout,
UInt32  WriteTimeout 
)

Sets the read and write timeout values.

Returns
FT_STATUS value from FT_SetTimeouts in FTD2XX.DLL
Parameters
ReadTimeoutRead timeout value in ms. A value of 0 indicates an infinite timeout.
WriteTimeoutWrite timeout value in ms. A value of 0 indicates an infinite timeout.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.StopInTask ( )

Stops the driver issuing USB in requests.

Returns
FT_STATUS value from FT_StopInTask in FTD2XX.DLL
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.Write ( byte[]  dataBuffer,
Int32  numBytesToWrite,
ref UInt32  numBytesWritten 
)

Write data to an open FTDI device.

Returns
FT_STATUS value from FT_Write in FTD2XX.DLL
Parameters
dataBufferAn array of bytes which contains the data to be written to the device.
numBytesToWriteThe number of bytes to be written to the device.
numBytesWrittenThe number of bytes actually written to the device.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.Write ( byte[]  dataBuffer,
UInt32  numBytesToWrite,
ref UInt32  numBytesWritten 
)

Write data to an open FTDI device.

Returns
FT_STATUS value from FT_Write in FTD2XX.DLL
Parameters
dataBufferAn array of bytes which contains the data to be written to the device.
numBytesToWriteThe number of bytes to be written to the device.
numBytesWrittenThe number of bytes actually written to the device.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.Write ( string  dataBuffer,
Int32  numBytesToWrite,
ref UInt32  numBytesWritten 
)

Write data to an open FTDI device.

Returns
FT_STATUS value from FT_Write in FTD2XX.DLL
Parameters
dataBufferA string which contains the data to be written to the device.
numBytesToWriteThe number of bytes to be written to the device.
numBytesWrittenThe number of bytes actually written to the device.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.Write ( string  dataBuffer,
UInt32  numBytesToWrite,
ref UInt32  numBytesWritten 
)

Write data to an open FTDI device.

Returns
FT_STATUS value from FT_Write in FTD2XX.DLL
Parameters
dataBufferA string which contains the data to be written to the device.
numBytesToWriteThe number of bytes to be written to the device.
numBytesWrittenThe number of bytes actually written to the device.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.WriteEEPROMLocation ( UInt32  Address,
UInt16  EEValue 
)

Writes an individual word value to a specified location in the device's EEPROM.

Returns
FT_STATUS value from FT_WriteEE in FTD2XX.DLL
Parameters
AddressThe EEPROM location to read data from
EEValueThe WORD value to write to the EEPROM location specified by the Address parameter
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.WriteFT2232EEPROM ( FT2232_EEPROM_STRUCTURE  ee2232)

Writes the specified values to the EEPROM of an FT2232 device. Calls FT_EE_Program in FTD2XX DLL

Returns
FT_STATUS value from FT_EE_Program in FTD2XX DLL
Parameters
ee2232The EEPROM settings to be written to the device
Remarks
If the strings are too long, they will be truncated to their maximum permitted lengths
Exceptions
FT_EXCEPTIONThrown when the current device does not match the type required by this method.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.WriteFT2232HEEPROM ( FT2232H_EEPROM_STRUCTURE  ee2232h)

Writes the specified values to the EEPROM of an FT2232H device. Calls FT_EE_Program in FTD2XX DLL

Returns
FT_STATUS value from FT_EE_Program in FTD2XX DLL
Parameters
ee2232hThe EEPROM settings to be written to the device
Remarks
If the strings are too long, they will be truncated to their maximum permitted lengths
Exceptions
FT_EXCEPTIONThrown when the current device does not match the type required by this method.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.WriteFT232BEEPROM ( FT232B_EEPROM_STRUCTURE  ee232b)

Writes the specified values to the EEPROM of an FT232B or FT245B device.

Returns
FT_STATUS value from FT_EE_Program in FTD2XX DLL
Parameters
ee232bThe EEPROM settings to be written to the device
Remarks
If the strings are too long, they will be truncated to their maximum permitted lengths
Exceptions
FT_EXCEPTIONThrown when the current device does not match the type required by this method.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.WriteFT232HEEPROM ( FT232H_EEPROM_STRUCTURE  ee232h)

Writes the specified values to the EEPROM of an FT232H device. Calls FT_EE_Program in FTD2XX DLL

Returns
FT_STATUS value from FT_EE_Program in FTD2XX DLL
Parameters
ee232hThe EEPROM settings to be written to the device
Remarks
If the strings are too long, they will be truncated to their maximum permitted lengths
Exceptions
FT_EXCEPTIONThrown when the current device does not match the type required by this method.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.WriteFT232REEPROM ( FT232R_EEPROM_STRUCTURE  ee232r)

Writes the specified values to the EEPROM of an FT232R or FT245R device. Calls FT_EE_Program in FTD2XX DLL

Returns
FT_STATUS value from FT_EE_Program in FTD2XX DLL
Parameters
ee232rThe EEPROM settings to be written to the device
Remarks
If the strings are too long, they will be truncated to their maximum permitted lengths
Exceptions
FT_EXCEPTIONThrown when the current device does not match the type required by this method.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.WriteFT4232HEEPROM ( FT4232H_EEPROM_STRUCTURE  ee4232h)

Writes the specified values to the EEPROM of an FT4232H device. Calls FT_EE_Program in FTD2XX DLL

Returns
FT_STATUS value from FT_EE_Program in FTD2XX DLL
Parameters
ee4232hThe EEPROM settings to be written to the device
Remarks
If the strings are too long, they will be truncated to their maximum permitted lengths
Exceptions
FT_EXCEPTIONThrown when the current device does not match the type required by this method.
FT_STATUS DirectOutput.Cab.Out.FTDIChip.FTDI.WriteXSeriesEEPROM ( FT_XSERIES_EEPROM_STRUCTURE  eeX)

Writes the specified values to the EEPROM of an X-Series device. Calls FT_EEPROM_Program in FTD2XX DLL

Returns
FT_STATUS value from FT_EEPROM_Program in FTD2XX DLL
Parameters
eeXThe EEPROM settings to be written to the device
Remarks
If the strings are too long, they will be truncated to their maximum permitted lengths
Exceptions
FT_EXCEPTIONThrown when the current device does not match the type required by this method.

Property Documentation

bool DirectOutput.Cab.Out.FTDIChip.FTDI.IsOpen
get

Gets the open status of the device.

Event Documentation

EventHandler<EventArgs> DirectOutput.Cab.Out.FTDIChip.FTDI.CharReceived

Occurs when the FDTI devices receives a byte.


The documentation for this class was generated from the following file: