Your browser does not allow scripts
Please click here to view a static table of contents without scripts
Type Definitions
Return to Introduction  Previous page  Next page
Excerpts from the header file FTD2XX.H are included in this appendix to explain any references in the descriptions of the functions in this document.
For Visual C++ applications, these values are pre-declared in the header file (
FTD2XX.H), which is included in the driver release. For other languages, these definitions will have to be converted to use equivalent types, and may have to be defined in an include file or within the body of the code. For non-Visual C++ applications, check the application code examples on the FTDI website as a translation of these may already exist.


UCHAR       Unsigned char (1 byte)
PUCHAR       Pointer to unsigned char (4 bytes)
PCHAR       Pointer to char (4 bytes)
DWORD       Unsigned long (4 bytes)
LPDWORD      Pointer to unsigned long (4 bytes)
FT_HANDLE      
DWORD


FT_STATUS (DWORD)
   FT_OK = 0
   FT_INVALID_HANDLE = 1
   FT_DEVICE_NOT_FOUND = 2
   FT_DEVICE_NOT_OPENED = 3
   FT_IO_ERROR = 4
   FT_INSUFFICIENT_RESOURCES = 5
   FT_INVALID_PARAMETER = 6
   FT_INVALID_BAUD_RATE = 7
   FT_DEVICE_NOT_OPENED_FOR_ERASE = 8
   FT_DEVICE_NOT_OPENED_FOR_WRITE = 9
   FT_FAILED_TO_WRITE_DEVICE = 10
   FT_EEPROM_READ_FAILED = 11
   FT_EEPROM_WRITE_FAILED = 12
   FT_EEPROM_ERASE_FAILED = 13
   FT_EEPROM_NOT_PRESENT = 14
   FT_EEPROM_NOT_PROGRAMMED = 15
   FT_INVALID_ARGS = 16
   FT_NOT_SUPPORTED = 17
   FT_OTHER_ERROR = 18


Flags (see FT_OpenEx)
   FT_OPEN_BY_SERIAL_NUMBER = 1
   FT_OPEN_BY_DESCRIPTION = 2
   FT_OPEN_BY_LOCATION = 4


Flags (see FT_ListDevices)
   FT_LIST_NUMBER_ONLY = 0x80000000
   FT_LIST_BY_INDEX = 0x40000000
   FT_LIST_ALL = 0x20000000


FT_DEVICE (DWORD)
   FT_DEVICE_232BM = 0
   FT_DEVICE_232AM = 1
   FT_DEVICE_100AX = 2
   FT_DEVICE_UNKNOWN = 3
   FT_DEVICE_2232C = 4
   FT_DEVICE_232R = 5


Word Length (see FT_SetDataCharacteristics)
   FT_BITS_8 = 8
   FT_BITS_7 = 7


Stop Bits (see FT_SetDataCharacteristics)
   FT_STOP_BITS_1 = 0
   FT_STOP_BITS_2 = 2


Parity (see FT_SetDataCharacteristics)
   FT_PARITY_NONE = 0
   FT_PARITY_ODD = 1
   FT_PARITY_EVEN = 2
   FT_PARITY_MARK = 3
   FT_PARITY_SPACE = 4


Flow Control (see FT_SetFlowControl)
   FT_FLOW_NONE = 0x0000
   FT_FLOW_RTS_CTS = 0x0100
   FT_FLOW_DTR_DSR = 0x0200
   FT_FLOW_XON_XOFF = 0x0400


Purge RX and TX Buffers (see FT_Purge)
   FT_PURGE_RX = 1
   FT_PURGE_TX = 2


Notification Events (see FT_SetEventNotification)
   FT_EVENT_RXCHAR = 1
   FT_EVENT_MODEM_STATUS = 2


Modem Status (see FT_GetModemStatus)
   CTS = 0x10
   DSR = 0x20
   RI = 0x40
   DCD = 0x80


FT232R CBUS EEPROM OPTIONS - Ignored for FT245R (see FT_EE_Program and FT_EE_Read)
   CBUS_TXDEN = 0x00
   CBUS_PWRON = 0x01
   CBUS_RXLED = 0x02
   CBUS_TXLED = 0x03
   CBUS_TXRXLED = 0x04
   CBUS_SLEEP = 0x05
   CBUS_CLK48 = 0x06
   CBUS_CLK24 = 0x07
   CBUS_CLK12 = 0x08
   CBUS_CLK6 = 0x09
   CBUS_IOMODE = 0x0A
   CBUS_BITBANG_WR = 0x0B
   CBUS_BITBANG_RD = 0x0C


FT_DEVICE_LIST_INFO_NODE (see FT_GetDeviceInfoList)
typedef struct _ft_device_list_info_node {
   DWORD Flags;
   DWORD Type;
   DWORD ID;
   DWORD LocId;
   char SerialNumber[16];
   char Description[64];
   FT_HANDLE ftHandle;
} FT_DEVICE_LIST_INFO_NODE;


FT_PROGRAM_DATA (EEPROM Programming Interface)
typedef struct ft_program_data {
   WORD VendorId;          // 0x0403
   WORD ProductId;          // 0x6001
   char *Manufacturer;          // "FTDI"
   char *ManufacturerId;          // "FT"
   char *Description;          // "USB HS Serial Converter"
   char *SerialNumber;          // "FT000001" if fixed, or NULL
   WORD MaxPower;       // 0 < MaxPower <= 500
   WORD PnP;          // 0 = disabled, 1 = enabled
   WORD SelfPowered;       // 0 = bus powered, 1 = self powered
   WORD RemoteWakeup;       // 0 = not capable, 1 = capable
   //
   // Rev4 extensions
   //
   UCHAR Rev4;          // true if Rev4 chip, false otherwise
   UCHAR IsoIn;          // true if in endpoint is isochronous
   UCHAR IsoOut;          // true if out endpoint is isochronous
   UCHAR PullDownEnable;       // true if pull down enabled
   UCHAR SerNumEnable;       // true if serial number to be used
   UCHAR USBVersionEnable;       // true if chip uses USBVersion
   WORD USBVersion;        // BCD (0x0200 => USB2)
} FT_PROGRAM_DATA, *PFT_PROGRAM_DATA;


FT_PROGRAM_DATA (EEPROM Programming Interface - compatible with DLL version 2.1.4.1 or later)
typedef struct ft_program_data {
   DWORD Signature1;         // Header - must be 0x00000000
   DWORD Signature2;         // Header - must be 0xffffffff
   DWORD Version;         // Header - FT_PROGRAM_DATA version
                  //    0 = original
             // 1 = FT2232C extensions
   WORD VendorId;         // 0x0403
   WORD ProductId;         // 0x6001
   char *Manufacturer;         // "FTDI"
   char *ManufacturerId;         // "FT"
   char *Description;         // "USB HS Serial Converter"
   char *SerialNumber;         // "FT000001" if fixed, or NULL
   WORD MaxPower;         // 0 < MaxPower <= 500
   WORD PnP;            // 0 = disabled, 1 = enabled
   WORD SelfPowered;         // 0 = bus powered, 1 = self powered
   WORD RemoteWakeup;         // 0 = not capable, 1 = capable
   //
   // Rev4 extensions
   //
   UCHAR Rev4;            // non-zero if Rev4 chip, zero otherwise
   UCHAR IsoIn;            // non-zero if in endpoint is isochronous
   UCHAR IsoOut;            // non-zero if out endpoint is isochronous
   UCHAR PullDownEnable;      // non-zero if pull down enabled
   UCHAR SerNumEnable;         // non-zero if serial number to be used
   UCHAR USBVersionEnable;      // non-zero if chip uses USBVersion
   WORD USBVersion;         // BCD (0x0200 => USB2)
   //
   // FT2232C extensions
   //
   UCHAR Rev5;            // non-zero if Rev5 chip, zero otherwise
   UCHAR IsoInA;            // non-zero if in endpoint is isochronous
   UCHAR IsoInB;            // non-zero if in endpoint is isochronous
   UCHAR IsoOutA;         // non-zero if out endpoint is isochronous
   UCHAR IsoOutB;         // non-zero if out endpoint is isochronous
   UCHAR PullDownEnable5;      // non-zero if pull down enabled
   UCHAR SerNumEnable5;      // non-zero if serial number to be used
   UCHAR USBVersionEnable5;      // non-zero if chip uses USBVersion
   WORD USBVersion5;         // BCD (0x0200 => USB2)
   UCHAR AIsHighCurrent;         // non-zero if interface is high current
   UCHAR BIsHighCurrent;         // non-zero if interface is high current
   UCHAR IFAIsFifo;         // non-zero if interface is 245 FIFO
   UCHAR IFAIsFifoTar;         // non-zero if interface is 245 FIFO CPU target
   UCHAR IFAIsFastSer;         // non-zero if interface is Fast serial
   UCHAR AIsVCP;         // non-zero if interface is to use VCP drivers
   UCHAR IFBIsFifo;         // non-zero if interface is 245 FIFO
   UCHAR IFBIsFifoTar;         // non-zero if interface is 245 FIFO CPU target
   UCHAR IFBIsFastSer;         // non-zero if interface is Fast serial
   UCHAR BIsVCP;         // non-zero if interface is to use VCP drivers

} FT_PROGRAM_DATA, *PFT_PROGRAM_DATA;


FT_PROGRAM_DATA (EEPROM Programming Interface - compatible with DLL version 3.1.6.1 or later)
typedef struct ft_program_data {
   DWORD Signature1;         // Header - must be 0x00000000
   DWORD Signature2;         // Header - must be 0xffffffff
   DWORD Version;         // Header - FT_PROGRAM_DATA version
                  // 0 = original
             // 1 = FT2232C extensions
                  //   2 = FT232R extensions
   WORD VendorId;         // 0x0403
   WORD ProductId;         // 0x6001
   char *Manufacturer;         // "FTDI"
   char *ManufacturerId;         // "FT"
   char *Description;         // "USB HS Serial Converter"
   char *SerialNumber;         // "FT000001" if fixed, or NULL
   WORD MaxPower;         // 0 < MaxPower <= 500
   WORD PnP;            // 0 = disabled, 1 = enabled
   WORD SelfPowered;         // 0 = bus powered, 1 = self powered
   WORD RemoteWakeup;         // 0 = not capable, 1 = capable
   //
   // Rev4 extensions
   //
   UCHAR Rev4;            // non-zero if Rev4 chip, zero otherwise
   UCHAR IsoIn;            // non-zero if in endpoint is isochronous
   UCHAR IsoOut;            // non-zero if out endpoint is isochronous
   UCHAR PullDownEnable;      // non-zero if pull down enabled
   UCHAR SerNumEnable;         // non-zero if serial number to be used
   UCHAR USBVersionEnable;      // non-zero if chip uses USBVersion
   WORD USBVersion;         // BCD (0x0200 => USB2)
   //
   // FT2232C extensions
   //
   UCHAR Rev5;            // non-zero if Rev5 chip, zero otherwise
   UCHAR IsoInA;            // non-zero if in endpoint is isochronous
   UCHAR IsoInB;            // non-zero if in endpoint is isochronous
   UCHAR IsoOutA;         // non-zero if out endpoint is isochronous
   UCHAR IsoOutB;         // non-zero if out endpoint is isochronous
   UCHAR PullDownEnable5;      // non-zero if pull down enabled
   UCHAR SerNumEnable5;      // non-zero if serial number to be used
   UCHAR USBVersionEnable5;      // non-zero if chip uses USBVersion
   WORD USBVersion5;         // BCD (0x0200 => USB2)
   UCHAR AIsHighCurrent;         // non-zero if interface is high current
   UCHAR BIsHighCurrent;         // non-zero if interface is high current
   UCHAR IFAIsFifo;         // non-zero if interface is 245 FIFO
   UCHAR IFAIsFifoTar;         // non-zero if interface is 245 FIFO CPU target
   UCHAR IFAIsFastSer;         // non-zero if interface is Fast serial
   UCHAR AIsVCP;         // non-zero if interface is to use VCP drivers
   UCHAR IFBIsFifo;         // non-zero if interface is 245 FIFO
   UCHAR IFBIsFifoTar;         // non-zero if interface is 245 FIFO CPU target
   UCHAR IFBIsFastSer;         // non-zero if interface is Fast serial
   UCHAR BIsVCP;         // non-zero if interface is to use VCP drivers
   //
   // FT232R extensions
   //
   UCHAR UseExtOsc;         // Use External Oscillator
   UCHAR HighDriveIOs;         // High Drive I/Os
   UCHAR EndpointSize;         // Endpoint size
   UCHAR PullDownEnableR;      // non-zero if pull down enabled
   UCHAR SerNumEnableR;      // non-zero if serial number to be used
   UCHAR InvertTXD;         // non-zero if invert TXD
   UCHAR InvertRXD;         // non-zero if invert RXD
   UCHAR InvertRTS;         // non-zero if invert RTS
   UCHAR InvertCTS;         // non-zero if invert CTS
   UCHAR InvertDTR;         // non-zero if invert DTR
   UCHAR InvertDSR;         // non-zero if invert DSR
   UCHAR InvertDCD;         // non-zero if invert DCD
   UCHAR InvertRI;            // non-zero if invert RI
   UCHAR Cbus0;            // Cbus Mux control - Ignored for FT245R
   UCHAR Cbus1;            // Cbus Mux control - Ignored for FT245R
   UCHAR Cbus2;            // Cbus Mux control - Ignored for FT245R
   UCHAR Cbus3;            // Cbus Mux control - Ignored for FT245R
   UCHAR Cbus4;            // Cbus Mux control - Ignored for FT245R
   UCHAR RIsVCP;         // non-zero if using VCP drivers
} FT_PROGRAM_DATA, *PFT_PROGRAM_DATA;


FTCOMSTAT (FT-Win32 Programming Interface)
typedef struct _FTCOMSTAT {
   DWORD fCtsHold : 1;
   DWORD fDsrHold : 1;
   DWORD fRlsdHold : 1;
   DWORD fXoffHold : 1;
   DWORD fXoffSent : 1;
   DWORD fEof : 1;
   DWORD fTxim : 1;
   DWORD fReserved : 25;
   DWORD cbInQue;
   DWORD cbOutQue;
} FTCOMSTAT, *LPFTCOMSTAT;


FTDCB (FT-Win32 Programming Interface)
typedef struct _FTDCB {
   DWORD DCBlength;       // sizeof(FTDCB)
   DWORD BaudRate;       // Baudrate at which running
   DWORD fBinary: 1;       // Binary Mode (skip EOF check)
   DWORD fParity: 1;       // Enable parity checking
   DWORD fOutxCtsFlow:1;       // CTS handshaking on output
   DWORD fOutxDsrFlow:1;       // DSR handshaking on output
   DWORD fDtrControl:2;       // DTR Flow control
   DWORD fDsrSensitivity:1;       // DSR Sensitivity
   DWORD fTXContinueOnXoff: 1;       // Continue TX when Xoff sent
   DWORD fOutX: 1;       // Enable output X-ON/X-OFF
   DWORD fInX: 1;       // Enable input X-ON/X-OFF
   DWORD fErrorChar: 1;       // Enable Err Replacement
   DWORD fNull: 1;       // Enable Null stripping
   DWORD fRtsControl:2;       // Rts Flow control
   DWORD fAbortOnError:1;       // Abort all reads and writes on Error
   DWORD fDummy2:17;       // Reserved
   WORD wReserved;       // Not currently used
   WORD XonLim;       // Transmit X-ON threshold
   WORD XoffLim;       // Transmit X-OFF threshold
   BYTE ByteSize;       // Number of bits/byte, 7-8
   BYTE Parity;       // 0-4=None,Odd,Even,Mark,Space
   BYTE StopBits;       // 0,2 = 1, 2
   char XonChar;       // Tx and Rx X-ON character
   char XoffChar;          // Tx and Rx X-OFF character
   char ErrorChar;       // Error replacement char
   char EofChar;          // End of Input character
   char EvtChar;          // Received Event character
   WORD wReserved1;       // Fill
} FTDCB, *LPFTDCB;


FTTIMEOUTS (FT-Win32 Programming Interface)
typedef struct _FTTIMEOUTS {
   DWORD ReadIntervalTimeout;    // Maximum time between read chars
   DWORD ReadTotalTimeoutMultiplier;    // Multiplier of characters
   DWORD ReadTotalTimeoutConstant;    // Constant in milliseconds
   DWORD WriteTotalTimeoutMultiplier;    // Multiplier of characters
   DWORD WriteTotalTimeoutConstant;    // Constant in milliseconds
} FTTIMEOUTS, *LPFTTIMEOUTS;