C# Класс FTD2XX_NET.FTDI

Class wrapper for FTD2XX.DLL
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
ErrorHandler void
FreeLibrary bool
GetProcAddress System.IntPtr
LoadLibrary System.IntPtr

Открытые методы

Метод Описание
Close ( ) : FT_STATUS

Closes the handle to an open FTDI device.

CyclePort ( ) : FT_STATUS

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.

EEReadUserArea ( byte UserAreaDataBuffer, UInt32 &numBytesRead ) : FT_STATUS

Reads data from the user area of the device EEPROM.

EEUserAreaSize ( UInt32 &UASize ) : FT_STATUS

Gets the size of the EEPROM user area.

EEWriteUserArea ( byte UserAreaDataBuffer ) : FT_STATUS

Writes data to the user area of the device EEPROM.

EraseEEPROM ( ) : FT_STATUS

Erases the device EEPROM.

FTDI ( ) : System

Constructor for the FTDI class.

GetCOMPort ( string &ComPortName ) : FT_STATUS

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

GetDescription ( string &Description ) : FT_STATUS

Gets the description of the current device.

GetDeviceID ( UInt32 &DeviceID ) : FT_STATUS

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

GetDeviceList ( FT_DEVICE_INFO_NODE devicelist ) : FT_STATUS

Gets information on all of the FTDI devices available.

GetDeviceType ( FT_DEVICE &DeviceType ) : FT_STATUS

Gets the chip type of the current device.

GetDriverVersion ( UInt32 &DriverVersion ) : FT_STATUS

Gets the current FTDIBUS.SYS driver version number.

GetEventType ( UInt32 &EventType ) : FT_STATUS

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.

GetLatency ( byte &Latency ) : FT_STATUS

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

GetLibraryVersion ( UInt32 &LibraryVersion ) : FT_STATUS

Gets the current FTD2XX.DLL driver version number.

GetLineStatus ( byte &LineStatus ) : FT_STATUS

Gets the current line status.

GetModemStatus ( byte &ModemStatus ) : FT_STATUS

Gets the current modem status.

GetNumberOfDevices ( UInt32 &devcount ) : FT_STATUS

Gets the number of FTDI devices available.

GetPinStates ( byte &BitMode ) : FT_STATUS

Gets the instantaneous state of the device IO pins.

GetRxBytesAvailable ( UInt32 &RxQueue ) : FT_STATUS

Gets the number of bytes available in the receive buffer.

GetSerialNumber ( string &SerialNumber ) : FT_STATUS

Gets the serial number of the current device.

GetTxBytesWaiting ( UInt32 &TxQueue ) : FT_STATUS

Gets the number of bytes waiting in the transmit buffer.

InTransferSize ( UInt32 InTransferSize ) : FT_STATUS

Sets the USB IN and OUT transfer sizes.

OpenByDescription ( string description ) : FT_STATUS

Opens the FTDI device with the specified description.

Initialises the device to 8 data bits, 1 stop bit, no parity, no flow control and 9600 Baud.

OpenByIndex ( UInt32 index ) : FT_STATUS

Opens the FTDI device with the specified index.

Initialises the device to 8 data bits, 1 stop bit, no parity, no flow control and 9600 Baud.

OpenByLocation ( UInt32 location ) : FT_STATUS

Opens the FTDI device at the specified physical location.

Initialises the device to 8 data bits, 1 stop bit, no parity, no flow control and 9600 Baud.

OpenBySerialNumber ( string serialnumber ) : FT_STATUS

Opens the FTDI device with the specified serial number.

Initialises the device to 8 data bits, 1 stop bit, no parity, no flow control and 9600 Baud.

Purge ( UInt32 purgemask ) : FT_STATUS

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

Read ( byte dataBuffer, UInt32 numBytesToRead, UInt32 &numBytesRead ) : FT_STATUS

Read data from an open FTDI device.

Read ( string &dataBuffer, UInt32 numBytesToRead, UInt32 &numBytesRead ) : FT_STATUS

Read data from an open FTDI device.

ReadEEPROMLocation ( UInt32 Address, UInt16 &EEValue ) : FT_STATUS

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

ReadFT2232EEPROM ( FT2232_EEPROM_STRUCTURE ee2232 ) : FT_STATUS

Reads the EEPROM contents of an FT2232 device.

ReadFT2232HEEPROM ( FT2232H_EEPROM_STRUCTURE ee2232h ) : FT_STATUS

Reads the EEPROM contents of an FT2232H device.

ReadFT232BEEPROM ( FT232B_EEPROM_STRUCTURE ee232b ) : FT_STATUS

Reads the EEPROM contents of an FT232B or FT245B device.

ReadFT232HEEPROM ( FT232H_EEPROM_STRUCTURE ee232h ) : FT_STATUS

Reads the EEPROM contents of an FT232H device.

ReadFT232REEPROM ( FT232R_EEPROM_STRUCTURE ee232r ) : FT_STATUS

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

ReadFT4232HEEPROM ( FT4232H_EEPROM_STRUCTURE ee4232h ) : FT_STATUS

Reads the EEPROM contents of an FT4232H device.

ReadXSeriesEEPROM ( FT_XSERIES_EEPROM_STRUCTURE eeX ) : FT_STATUS

Reads the EEPROM contents of an X-Series device.

Reload ( UInt16 VendorID, UInt16 ProductID ) : FT_STATUS

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

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

Rescan ( ) : FT_STATUS

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.

ResetDevice ( ) : FT_STATUS

Reset an open FTDI device.

ResetPort ( ) : FT_STATUS

Resets the device port.

RestartInTask ( ) : FT_STATUS

Resumes the driver issuing USB in requests.

SetBaudRate ( UInt32 BaudRate ) : FT_STATUS

Sets the current Baud rate.

SetBitMode ( byte Mask, byte BitMode ) : FT_STATUS

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

SetBreak ( bool Enable ) : FT_STATUS

Sets or clears the break state.

SetCharacters ( byte EventChar, bool EventCharEnable, byte ErrorChar, bool ErrorCharEnable ) : FT_STATUS

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

SetDTR ( bool Enable ) : FT_STATUS

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

SetDataCharacteristics ( byte DataBits, byte StopBits, byte Parity ) : FT_STATUS

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

SetDeadmanTimeout ( UInt32 DeadmanTimeout ) : FT_STATUS

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

SetEventNotification ( UInt32 eventmask, EventWaitHandle eventhandle ) : FT_STATUS

Register for event notification.

After setting event notification, the event can be caught by executing the WaitOne() method of the EventWaitHandle. If multiple event types are being monitored, the event that fired can be determined from the GetEventType method.

SetFlowControl ( UInt16 FlowControl, byte Xon, byte Xoff ) : FT_STATUS

Sets the flow control type.

SetLatency ( byte Latency ) : FT_STATUS

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

SetRTS ( bool Enable ) : FT_STATUS

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

SetResetPipeRetryCount ( UInt32 ResetPipeRetryCount ) : FT_STATUS

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

SetTimeouts ( UInt32 ReadTimeout, UInt32 WriteTimeout ) : FT_STATUS

Sets the read and write timeout values.

StopInTask ( ) : FT_STATUS

Stops the driver issuing USB in requests.

Write ( byte dataBuffer, Int32 numBytesToWrite, UInt32 &numBytesWritten ) : FT_STATUS

Write data to an open FTDI device.

Write ( byte dataBuffer, UInt32 numBytesToWrite, UInt32 &numBytesWritten ) : FT_STATUS

Write data to an open FTDI device.

Write ( string dataBuffer, Int32 numBytesToWrite, UInt32 &numBytesWritten ) : FT_STATUS

Write data to an open FTDI device.

Write ( string dataBuffer, UInt32 numBytesToWrite, UInt32 &numBytesWritten ) : FT_STATUS

Write data to an open FTDI device.

WriteEEPROMLocation ( UInt32 Address, UInt16 EEValue ) : FT_STATUS

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

WriteFT2232EEPROM ( FT2232_EEPROM_STRUCTURE ee2232 ) : FT_STATUS

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

If the strings are too long, they will be truncated to their maximum permitted lengths

WriteFT2232HEEPROM ( FT2232H_EEPROM_STRUCTURE ee2232h ) : FT_STATUS

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

If the strings are too long, they will be truncated to their maximum permitted lengths

WriteFT232BEEPROM ( FT232B_EEPROM_STRUCTURE ee232b ) : FT_STATUS

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

If the strings are too long, they will be truncated to their maximum permitted lengths

WriteFT232HEEPROM ( FT232H_EEPROM_STRUCTURE ee232h ) : FT_STATUS

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

If the strings are too long, they will be truncated to their maximum permitted lengths

WriteFT232REEPROM ( FT232R_EEPROM_STRUCTURE ee232r ) : FT_STATUS

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

If the strings are too long, they will be truncated to their maximum permitted lengths

WriteFT4232HEEPROM ( FT4232H_EEPROM_STRUCTURE ee4232h ) : FT_STATUS

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

If the strings are too long, they will be truncated to their maximum permitted lengths

WriteXSeriesEEPROM ( FT_XSERIES_EEPROM_STRUCTURE eeX ) : FT_STATUS

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

If the strings are too long, they will be truncated to their maximum permitted lengths

Приватные методы

Метод Описание
ErrorHandler ( FT_STATUS ftStatus, FT_ERROR ftErrorCondition ) : void

Method to check ftStatus and ftErrorCondition values for error conditions and throw exceptions accordingly.

FreeLibrary ( IntPtr hModule ) : bool
GetProcAddress ( IntPtr hModule, string procedureName ) : IntPtr
LoadLibrary ( string dllToLoad ) : IntPtr

Описание методов

Close() публичный Метод

Closes the handle to an open FTDI device.
public Close ( ) : FT_STATUS
Результат 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.
public CyclePort ( ) : FT_STATUS
Результат FT_STATUS

EEReadUserArea() публичный Метод

Reads data from the user area of the device EEPROM.
public EEReadUserArea ( byte UserAreaDataBuffer, UInt32 &numBytesRead ) : FT_STATUS
UserAreaDataBuffer byte An array of bytes which will be populated with the data read from the device EEPROM user area.
numBytesRead System.UInt32 The number of bytes actually read from the EEPROM user area.
Результат FT_STATUS

EEUserAreaSize() публичный Метод

Gets the size of the EEPROM user area.
public EEUserAreaSize ( UInt32 &UASize ) : FT_STATUS
UASize System.UInt32 The EEPROM user area size in bytes.
Результат FT_STATUS

EEWriteUserArea() публичный Метод

Writes data to the user area of the device EEPROM.
public EEWriteUserArea ( byte UserAreaDataBuffer ) : FT_STATUS
UserAreaDataBuffer byte An array of bytes which will be written to the device EEPROM user area.
Результат FT_STATUS

EraseEEPROM() публичный Метод

Erases the device EEPROM.
Thrown when attempting to erase the EEPROM of a device with an internal EEPROM such as an FT232R or FT245R.
public EraseEEPROM ( ) : FT_STATUS
Результат FT_STATUS

FTDI() публичный Метод

Constructor for the FTDI class.
public FTDI ( ) : System
Результат System

GetCOMPort() публичный Метод

Gets the corresponding COM port number for the current device. If no COM port is exposed, an empty string is returned.
public GetCOMPort ( string &ComPortName ) : FT_STATUS
ComPortName string The COM port name corresponding to the current device. If no COM port is installed, an empty string is passed back.
Результат FT_STATUS

GetDescription() публичный Метод

Gets the description of the current device.
public GetDescription ( string &Description ) : FT_STATUS
Description string The description of the current device.
Результат FT_STATUS

GetDeviceID() публичный Метод

Gets the Vendor ID and Product ID of the current device.
public GetDeviceID ( UInt32 &DeviceID ) : FT_STATUS
DeviceID System.UInt32 The device ID (Vendor ID and Product ID) of the current device.
Результат FT_STATUS

GetDeviceList() публичный Метод

Gets information on all of the FTDI devices available.
Thrown when the supplied buffer is not large enough to contain the device info list.
public GetDeviceList ( FT_DEVICE_INFO_NODE devicelist ) : FT_STATUS
devicelist FT_DEVICE_INFO_NODE An array of type FT_DEVICE_INFO_NODE to contain the device information for all available devices.
Результат FT_STATUS

GetDeviceType() публичный Метод

Gets the chip type of the current device.
public GetDeviceType ( FT_DEVICE &DeviceType ) : FT_STATUS
DeviceType FT_DEVICE The FTDI chip type of the current device.
Результат FT_STATUS

GetDriverVersion() публичный Метод

Gets the current FTDIBUS.SYS driver version number.
public GetDriverVersion ( UInt32 &DriverVersion ) : FT_STATUS
DriverVersion System.UInt32 The current driver version number.
Результат FT_STATUS

GetEventType() публичный Метод

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.
public GetEventType ( UInt32 &EventType ) : FT_STATUS
EventType System.UInt32 The type of event that has occurred.
Результат FT_STATUS

GetLatency() публичный Метод

Gets the value of the latency timer. Default value is 16ms.
public GetLatency ( byte &Latency ) : FT_STATUS
Latency byte The latency timer value in ms.
Результат FT_STATUS

GetLibraryVersion() публичный Метод

Gets the current FTD2XX.DLL driver version number.
public GetLibraryVersion ( UInt32 &LibraryVersion ) : FT_STATUS
LibraryVersion System.UInt32 The current library version.
Результат FT_STATUS

GetLineStatus() публичный Метод

Gets the current line status.
public GetLineStatus ( byte &LineStatus ) : FT_STATUS
LineStatus byte A bit map representaion of the current line status.
Результат FT_STATUS

GetModemStatus() публичный Метод

Gets the current modem status.
public GetModemStatus ( byte &ModemStatus ) : FT_STATUS
ModemStatus byte A bit map representaion of the current modem status.
Результат FT_STATUS

GetNumberOfDevices() публичный Метод

Gets the number of FTDI devices available.
public GetNumberOfDevices ( UInt32 &devcount ) : FT_STATUS
devcount System.UInt32 The number of FTDI devices available.
Результат FT_STATUS

GetPinStates() публичный Метод

Gets the instantaneous state of the device IO pins.
public GetPinStates ( byte &BitMode ) : FT_STATUS
BitMode byte A bitmap value containing the instantaneous state of the device IO pins
Результат FT_STATUS

GetRxBytesAvailable() публичный Метод

Gets the number of bytes available in the receive buffer.
public GetRxBytesAvailable ( UInt32 &RxQueue ) : FT_STATUS
RxQueue System.UInt32 The number of bytes available to be read.
Результат FT_STATUS

GetSerialNumber() публичный Метод

Gets the serial number of the current device.
public GetSerialNumber ( string &SerialNumber ) : FT_STATUS
SerialNumber string The serial number of the current device.
Результат FT_STATUS

GetTxBytesWaiting() публичный Метод

Gets the number of bytes waiting in the transmit buffer.
public GetTxBytesWaiting ( UInt32 &TxQueue ) : FT_STATUS
TxQueue System.UInt32 The number of bytes waiting to be sent.
Результат FT_STATUS

InTransferSize() публичный Метод

Sets the USB IN and OUT transfer sizes.
public InTransferSize ( UInt32 InTransferSize ) : FT_STATUS
InTransferSize System.UInt32 The USB IN transfer size in bytes.
Результат FT_STATUS

OpenByDescription() публичный Метод

Opens the FTDI device with the specified description.
Initialises the device to 8 data bits, 1 stop bit, no parity, no flow control and 9600 Baud.
public OpenByDescription ( string description ) : FT_STATUS
description string Description of the device to open.
Результат FT_STATUS

OpenByIndex() публичный Метод

Opens the FTDI device with the specified index.
Initialises the device to 8 data bits, 1 stop bit, no parity, no flow control and 9600 Baud.
public OpenByIndex ( UInt32 index ) : FT_STATUS
index System.UInt32 Index of the device to open. /// Note that this cannot be guaranteed to open a specific device.
Результат FT_STATUS

OpenByLocation() публичный Метод

Opens the FTDI device at the specified physical location.
Initialises the device to 8 data bits, 1 stop bit, no parity, no flow control and 9600 Baud.
public OpenByLocation ( UInt32 location ) : FT_STATUS
location System.UInt32 Location of the device to open.
Результат FT_STATUS

OpenBySerialNumber() публичный Метод

Opens the FTDI device with the specified serial number.
Initialises the device to 8 data bits, 1 stop bit, no parity, no flow control and 9600 Baud.
public OpenBySerialNumber ( string serialnumber ) : FT_STATUS
serialnumber string Serial number of the device to open.
Результат FT_STATUS

Purge() публичный Метод

Purge data from the devices transmit and/or receive buffers.
public Purge ( UInt32 purgemask ) : FT_STATUS
purgemask System.UInt32 Specifies which buffer(s) to be purged. Valid values are any combination of the following flags: FT_PURGE_RX, FT_PURGE_TX
Результат FT_STATUS

Read() публичный Метод

Read data from an open FTDI device.
public Read ( byte dataBuffer, UInt32 numBytesToRead, UInt32 &numBytesRead ) : FT_STATUS
dataBuffer byte An array of bytes which will be populated with the data read from the device.
numBytesToRead System.UInt32 The number of bytes requested from the device.
numBytesRead System.UInt32 The number of bytes actually read.
Результат FT_STATUS

Read() публичный Метод

Read data from an open FTDI device.
public Read ( string &dataBuffer, UInt32 numBytesToRead, UInt32 &numBytesRead ) : FT_STATUS
dataBuffer string A string containing the data read
numBytesToRead System.UInt32 The number of bytes requested from the device.
numBytesRead System.UInt32 The number of bytes actually read.
Результат FT_STATUS

ReadEEPROMLocation() публичный Метод

Reads an individual word value from a specified location in the device's EEPROM.
public ReadEEPROMLocation ( UInt32 Address, UInt16 &EEValue ) : FT_STATUS
Address System.UInt32 The EEPROM location to read data from
EEValue System.UInt16 The WORD value read from the EEPROM location specified in the Address paramter
Результат FT_STATUS

ReadFT2232EEPROM() публичный Метод

Reads the EEPROM contents of an FT2232 device.
Thrown when the current device does not match the type required by this method.
public ReadFT2232EEPROM ( FT2232_EEPROM_STRUCTURE ee2232 ) : FT_STATUS
ee2232 FT2232_EEPROM_STRUCTURE An FT2232_EEPROM_STRUCTURE which contains only the relevant information for an FT2232 device.
Результат FT_STATUS

ReadFT2232HEEPROM() публичный Метод

Reads the EEPROM contents of an FT2232H device.
Thrown when the current device does not match the type required by this method.
public ReadFT2232HEEPROM ( FT2232H_EEPROM_STRUCTURE ee2232h ) : FT_STATUS
ee2232h FT2232H_EEPROM_STRUCTURE An FT2232H_EEPROM_STRUCTURE which contains only the relevant information for an FT2232H device.
Результат FT_STATUS

ReadFT232BEEPROM() публичный Метод

Reads the EEPROM contents of an FT232B or FT245B device.
Thrown when the current device does not match the type required by this method.
public ReadFT232BEEPROM ( FT232B_EEPROM_STRUCTURE ee232b ) : FT_STATUS
ee232b FT232B_EEPROM_STRUCTURE An FT232B_EEPROM_STRUCTURE which contains only the relevant information for an FT232B and FT245B device.
Результат FT_STATUS

ReadFT232HEEPROM() публичный Метод

Reads the EEPROM contents of an FT232H device.
Thrown when the current device does not match the type required by this method.
public ReadFT232HEEPROM ( FT232H_EEPROM_STRUCTURE ee232h ) : FT_STATUS
ee232h FT232H_EEPROM_STRUCTURE An FT232H_EEPROM_STRUCTURE which contains only the relevant information for an FT232H device.
Результат FT_STATUS

ReadFT232REEPROM() публичный Метод

Reads the EEPROM contents of an FT232R or FT245R device. Calls FT_EE_Read in FTD2XX DLL
Thrown when the current device does not match the type required by this method.
public ReadFT232REEPROM ( FT232R_EEPROM_STRUCTURE ee232r ) : FT_STATUS
ee232r FT232R_EEPROM_STRUCTURE
Результат FT_STATUS

ReadFT4232HEEPROM() публичный Метод

Reads the EEPROM contents of an FT4232H device.
Thrown when the current device does not match the type required by this method.
public ReadFT4232HEEPROM ( FT4232H_EEPROM_STRUCTURE ee4232h ) : FT_STATUS
ee4232h FT4232H_EEPROM_STRUCTURE An FT4232H_EEPROM_STRUCTURE which contains only the relevant information for an FT4232H device.
Результат FT_STATUS

ReadXSeriesEEPROM() публичный Метод

Reads the EEPROM contents of an X-Series device.
Thrown when the current device does not match the type required by this method.
public ReadXSeriesEEPROM ( FT_XSERIES_EEPROM_STRUCTURE eeX ) : FT_STATUS
eeX FT_XSERIES_EEPROM_STRUCTURE An FT_XSERIES_EEPROM_STRUCTURE which contains only the relevant information for an X-Series device.
Результат FT_STATUS

Reload() публичный Метод

Forces a reload of the driver for devices with a specific VID and PID combination.
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
public Reload ( UInt16 VendorID, UInt16 ProductID ) : FT_STATUS
VendorID System.UInt16 Vendor ID of the devices to have the driver reloaded
ProductID System.UInt16 Product ID of the devices to have the driver reloaded
Результат 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.
public Rescan ( ) : FT_STATUS
Результат FT_STATUS

ResetDevice() публичный Метод

Reset an open FTDI device.
public ResetDevice ( ) : FT_STATUS
Результат FT_STATUS

ResetPort() публичный Метод

Resets the device port.
public ResetPort ( ) : FT_STATUS
Результат FT_STATUS

RestartInTask() публичный Метод

Resumes the driver issuing USB in requests.
public RestartInTask ( ) : FT_STATUS
Результат FT_STATUS

SetBaudRate() публичный Метод

Sets the current Baud rate.
public SetBaudRate ( UInt32 BaudRate ) : FT_STATUS
BaudRate System.UInt32 The desired Baud rate for the device.
Результат FT_STATUS

SetBitMode() публичный Метод

Puts the device in a mode other than the default UART or FIFO mode.
Thrown when the current device does not support the requested bit mode.
public SetBitMode ( byte Mask, byte BitMode ) : FT_STATUS
Mask byte Sets 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.
BitMode byte For 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.
Результат FT_STATUS

SetBreak() публичный Метод

Sets or clears the break state.
public SetBreak ( bool Enable ) : FT_STATUS
Enable bool If true, sets break on. If false, sets break off.
Результат FT_STATUS

SetCharacters() публичный Метод

Sets an event character, an error character and enables or disables them.
public SetCharacters ( byte EventChar, bool EventCharEnable, byte ErrorChar, bool ErrorCharEnable ) : FT_STATUS
EventChar byte A character that will be tigger an IN to the host when this character is received.
EventCharEnable bool Determines if the EventChar is enabled or disabled.
ErrorChar byte A character that will be inserted into the data stream to indicate that an error has occurred.
ErrorCharEnable bool Determines if the ErrorChar is enabled or disabled.
Результат FT_STATUS

SetDTR() публичный Метод

Asserts or de-asserts the Data Terminal Ready (DTR) line.
public SetDTR ( bool Enable ) : FT_STATUS
Enable bool If true, asserts DTR. If false, de-asserts DTR.
Результат FT_STATUS

SetDataCharacteristics() публичный Метод

Sets the data bits, stop bits and parity for the device.
public SetDataCharacteristics ( byte DataBits, byte StopBits, byte Parity ) : FT_STATUS
DataBits byte The number of data bits for UART data. Valid values are FT_DATA_BITS.FT_DATA_7 or FT_DATA_BITS.FT_BITS_8
StopBits byte The 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
Parity byte The 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

SetDeadmanTimeout() публичный Метод

Sets the USB deadman timeout value. Default is 5000ms.
public SetDeadmanTimeout ( UInt32 DeadmanTimeout ) : FT_STATUS
DeadmanTimeout System.UInt32 The deadman timeout value in ms. Default is 5000ms.
Результат FT_STATUS

SetEventNotification() публичный Метод

Register for event notification.
After setting event notification, the event can be caught by executing the WaitOne() method of the EventWaitHandle. If multiple event types are being monitored, the event that fired can be determined from the GetEventType method.
public SetEventNotification ( UInt32 eventmask, EventWaitHandle eventhandle ) : FT_STATUS
eventmask System.UInt32 The type of events to signal. Can be any combination of the following: FT_EVENT_RXCHAR, FT_EVENT_MODEM_STATUS, FT_EVENT_LINE_STATUS
eventhandle System.Threading.EventWaitHandle Handle to the event that will receive the notification
Результат FT_STATUS

SetFlowControl() публичный Метод

Sets the flow control type.
public SetFlowControl ( UInt16 FlowControl, byte Xon, byte Xoff ) : FT_STATUS
FlowControl System.UInt16 The 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
Xon byte The Xon character for Xon/Xoff flow control. Ignored if not using Xon/XOff flow control.
Xoff byte The Xoff character for Xon/Xoff flow control. Ignored if not using Xon/XOff flow control.
Результат FT_STATUS

SetLatency() публичный Метод

Sets the value of the latency timer. Default value is 16ms.
public SetLatency ( byte Latency ) : FT_STATUS
Latency byte The 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

SetRTS() публичный Метод

Asserts or de-asserts the Request To Send (RTS) line.
public SetRTS ( bool Enable ) : FT_STATUS
Enable bool If true, asserts RTS. If false, de-asserts RTS
Результат FT_STATUS

SetResetPipeRetryCount() публичный Метод

Gets or sets the reset pipe retry count. Default value is 50.
public SetResetPipeRetryCount ( UInt32 ResetPipeRetryCount ) : FT_STATUS
ResetPipeRetryCount System.UInt32 The reset pipe retry count. /// Electrically noisy environments may benefit from a larger value.
Результат FT_STATUS

SetTimeouts() публичный Метод

Sets the read and write timeout values.
public SetTimeouts ( UInt32 ReadTimeout, UInt32 WriteTimeout ) : FT_STATUS
ReadTimeout System.UInt32 Read timeout value in ms. A value of 0 indicates an infinite timeout.
WriteTimeout System.UInt32 Write timeout value in ms. A value of 0 indicates an infinite timeout.
Результат FT_STATUS

StopInTask() публичный Метод

Stops the driver issuing USB in requests.
public StopInTask ( ) : FT_STATUS
Результат FT_STATUS

Write() публичный Метод

Write data to an open FTDI device.
public Write ( byte dataBuffer, Int32 numBytesToWrite, UInt32 &numBytesWritten ) : FT_STATUS
dataBuffer byte An array of bytes which contains the data to be written to the device.
numBytesToWrite System.Int32 The number of bytes to be written to the device.
numBytesWritten System.UInt32 The number of bytes actually written to the device.
Результат FT_STATUS

Write() публичный Метод

Write data to an open FTDI device.
public Write ( byte dataBuffer, UInt32 numBytesToWrite, UInt32 &numBytesWritten ) : FT_STATUS
dataBuffer byte An array of bytes which contains the data to be written to the device.
numBytesToWrite System.UInt32 The number of bytes to be written to the device.
numBytesWritten System.UInt32 The number of bytes actually written to the device.
Результат FT_STATUS

Write() публичный Метод

Write data to an open FTDI device.
public Write ( string dataBuffer, Int32 numBytesToWrite, UInt32 &numBytesWritten ) : FT_STATUS
dataBuffer string A string which contains the data to be written to the device.
numBytesToWrite System.Int32 The number of bytes to be written to the device.
numBytesWritten System.UInt32 The number of bytes actually written to the device.
Результат FT_STATUS

Write() публичный Метод

Write data to an open FTDI device.
public Write ( string dataBuffer, UInt32 numBytesToWrite, UInt32 &numBytesWritten ) : FT_STATUS
dataBuffer string A string which contains the data to be written to the device.
numBytesToWrite System.UInt32 The number of bytes to be written to the device.
numBytesWritten System.UInt32 The number of bytes actually written to the device.
Результат FT_STATUS

WriteEEPROMLocation() публичный Метод

Writes an individual word value to a specified location in the device's EEPROM.
public WriteEEPROMLocation ( UInt32 Address, UInt16 EEValue ) : FT_STATUS
Address System.UInt32 The EEPROM location to read data from
EEValue System.UInt16 The WORD value to write to the EEPROM location specified by the Address parameter
Результат FT_STATUS

WriteFT2232EEPROM() публичный Метод

Writes the specified values to the EEPROM of an FT2232 device. Calls FT_EE_Program in FTD2XX DLL
If the strings are too long, they will be truncated to their maximum permitted lengths
Thrown when the current device does not match the type required by this method.
public WriteFT2232EEPROM ( FT2232_EEPROM_STRUCTURE ee2232 ) : FT_STATUS
ee2232 FT2232_EEPROM_STRUCTURE The EEPROM settings to be written to the device
Результат FT_STATUS

WriteFT2232HEEPROM() публичный Метод

Writes the specified values to the EEPROM of an FT2232H device. Calls FT_EE_Program in FTD2XX DLL
If the strings are too long, they will be truncated to their maximum permitted lengths
Thrown when the current device does not match the type required by this method.
public WriteFT2232HEEPROM ( FT2232H_EEPROM_STRUCTURE ee2232h ) : FT_STATUS
ee2232h FT2232H_EEPROM_STRUCTURE The EEPROM settings to be written to the device
Результат FT_STATUS

WriteFT232BEEPROM() публичный Метод

Writes the specified values to the EEPROM of an FT232B or FT245B device.
If the strings are too long, they will be truncated to their maximum permitted lengths
Thrown when the current device does not match the type required by this method.
public WriteFT232BEEPROM ( FT232B_EEPROM_STRUCTURE ee232b ) : FT_STATUS
ee232b FT232B_EEPROM_STRUCTURE The EEPROM settings to be written to the device
Результат FT_STATUS

WriteFT232HEEPROM() публичный Метод

Writes the specified values to the EEPROM of an FT232H device. Calls FT_EE_Program in FTD2XX DLL
If the strings are too long, they will be truncated to their maximum permitted lengths
Thrown when the current device does not match the type required by this method.
public WriteFT232HEEPROM ( FT232H_EEPROM_STRUCTURE ee232h ) : FT_STATUS
ee232h FT232H_EEPROM_STRUCTURE The EEPROM settings to be written to the device
Результат FT_STATUS

WriteFT232REEPROM() публичный Метод

Writes the specified values to the EEPROM of an FT232R or FT245R device. Calls FT_EE_Program in FTD2XX DLL
If the strings are too long, they will be truncated to their maximum permitted lengths
Thrown when the current device does not match the type required by this method.
public WriteFT232REEPROM ( FT232R_EEPROM_STRUCTURE ee232r ) : FT_STATUS
ee232r FT232R_EEPROM_STRUCTURE The EEPROM settings to be written to the device
Результат FT_STATUS

WriteFT4232HEEPROM() публичный Метод

Writes the specified values to the EEPROM of an FT4232H device. Calls FT_EE_Program in FTD2XX DLL
If the strings are too long, they will be truncated to their maximum permitted lengths
Thrown when the current device does not match the type required by this method.
public WriteFT4232HEEPROM ( FT4232H_EEPROM_STRUCTURE ee4232h ) : FT_STATUS
ee4232h FT4232H_EEPROM_STRUCTURE The EEPROM settings to be written to the device
Результат FT_STATUS

WriteXSeriesEEPROM() публичный Метод

Writes the specified values to the EEPROM of an X-Series device. Calls FT_EEPROM_Program in FTD2XX DLL
If the strings are too long, they will be truncated to their maximum permitted lengths
Thrown when the current device does not match the type required by this method.
public WriteXSeriesEEPROM ( FT_XSERIES_EEPROM_STRUCTURE eeX ) : FT_STATUS
eeX FT_XSERIES_EEPROM_STRUCTURE The EEPROM settings to be written to the device
Результат FT_STATUS