C# 클래스 FTD2XX_NET.FTDI

Class wrapper for FTD2XX.DLL
파일 보기 프로젝트 열기: GNOME/chronojump 1 사용 예제들

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