Witam Mam problem chcę złożyć programator avt5125. Wymaga on sterowników wirtualnego portu com. ściągnąłem go i tu pod górę jak go zainstalować? z góry dziękuję za pomoc
/*++
Copyright (c) 2001-2007 Future Technology Devices International Ltd.
Module Name:
ftd2xx.h
Abstract:
Native USB device driver for FTDI FT8U232/245
FTD2XX library definitions
Environment:
kernel & user mode
Revision History:
13/03/01 awm Created.
13/01/03 awm Added device information support.
19/03/03 awm Added FT_W32_CancelIo.
12/06/03 awm Added FT_StopInTask and FT_RestartInTask.
18/09/03 awm Added FT_SetResetPipeRetryCount.
10/10/03 awm Added FT_ResetPort.
23/01/04 awm Added support for open-by-location.
16/03/04 awm Added support for FT2232C.
23/09/04 awm Added support for FT232R.
20/10/04 awm Added FT_CyclePort.
18/01/05 awm Added FT_DEVICE_LIST_INFO_NODE type.
11/02/05 awm Added LocId to FT_DEVICE_LIST_INFO_NODE.
25/08/05 awm Added FT_SetDeadmanTimeout.
02/12/05 awm Removed obsolete references.
05/12/05 awm Added FT_GetVersion, FT_GetVersionEx.
08/09/06 awm Added FT_W32_GetCommMask.
11/09/06 awm Added FT_Rescan.
11/07/07 awm Added support for FT2232H and FT4232H.
10/08/07 awm Added flags definitions.
21/11/07 mja Added FT_GetComPortNumber.
05/06/08 mja Added EEPROM extensions for FT2232H.
--*/
#ifndef FTD2XX_H
#define FTD2XX_H
// The following ifdef block is the standard way of creating macros
// which make exporting from a DLL simpler. All files within this DLL
// are compiled with the FTD2XX_EXPORTS symbol defined on the command line.
// This symbol should not be defined on any project that uses this DLL.
// This way any other project whose source files include this file see
// FTD2XX_API functions as being imported from a DLL, whereas this DLL
// sees symbols defined with this macro as being exported.
#ifdef FTD2XX_EXPORTS
#define FTD2XX_API __declspec(dllexport)
#else
#define FTD2XX_API __declspec(dllimport)
#endif
typedef PVOID FT_HANDLE;
typedef ULONG FT_STATUS;
//
// Device status
//
enum {
FT_OK,
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_NOT_SUPPORTED,
FT_OTHER_ERROR,
FT_DEVICE_LIST_NOT_READY,
};
#define FT_SUCCESS(status) ((status) == FT_OK)
//
// FT_OpenEx Flags
//
#define FT_OPEN_BY_SERIAL_NUMBER 1
#define FT_OPEN_BY_DESCRIPTION 2
#define FT_OPEN_BY_LOCATION 4
//
// FT_ListDevices Flags (used in conjunction with FT_OpenEx Flags
//
#define FT_LIST_NUMBER_ONLY 0x80000000
#define FT_LIST_BY_INDEX 0x40000000
#define FT_LIST_ALL 0x20000000
#define FT_LIST_MASK (FT_LIST_NUMBER_ONLY|FT_LIST_BY_INDEX|FT_LIST_ALL)
//
// Baud Rates
//
#define FT_BAUD_300 300
#define FT_BAUD_600 600
#define FT_BAUD_1200 1200
#define FT_BAUD_2400 2400
#define FT_BAUD_4800 4800
#define FT_BAUD_9600 9600
#define FT_BAUD_14400 14400
#define FT_BAUD_19200 19200
#define FT_BAUD_38400 38400
#define FT_BAUD_57600 57600
#define FT_BAUD_115200 115200
#define FT_BAUD_230400 230400
#define FT_BAUD_460800 460800
#define FT_BAUD_921600 921600
//
// Word Lengths
//
#define FT_BITS_8 (UCHAR) 8
#define FT_BITS_7 (UCHAR) 7
#define FT_BITS_6 (UCHAR) 6
#define FT_BITS_5 (UCHAR) 5
//
// Stop Bits
//
#define FT_STOP_BITS_1 (UCHAR) 0
#define FT_STOP_BITS_1_5 (UCHAR) 1
#define FT_STOP_BITS_2 (UCHAR) 2
//
// Parity
//
#define FT_PARITY_NONE (UCHAR) 0
#define FT_PARITY_ODD (UCHAR) 1
#define FT_PARITY_EVEN (UCHAR) 2
#define FT_PARITY_MARK (UCHAR) 3
#define FT_PARITY_SPACE (UCHAR) 4
//
// Flow Control
//
#define FT_FLOW_NONE 0x0000
#define FT_FLOW_RTS_CTS 0x0100
#define FT_FLOW_DTR_DSR 0x0200
#define FT_FLOW_XON_XOFF 0x0400
//
// Purge rx and tx buffers
//
#define FT_PURGE_RX 1
#define FT_PURGE_TX 2
//
// Events
//
typedef void (*PFT_EVENT_HANDLER)(DWORD,DWORD);
#define FT_EVENT_RXCHAR 1
#define FT_EVENT_MODEM_STATUS 2
#define FT_EVENT_LINE_STATUS 4
//
// Timeouts
//
#define FT_DEFAULT_RX_TIMEOUT 300
#define FT_DEFAULT_TX_TIMEOUT 300
//
// Device types
//
typedef ULONG FT_DEVICE;
enum {
FT_DEVICE_BM,
FT_DEVICE_AM,
FT_DEVICE_100AX,
FT_DEVICE_UNKNOWN,
FT_DEVICE_2232C,
FT_DEVICE_232R,
FT_DEVICE_2232H,
FT_DEVICE_4232H
};
#ifdef __cplusplus
extern " C " {
#endif
FTD2XX_API
FT_STATUS WINAPI FT_Open(
int deviceNumber,
FT_HANDLE *pHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_OpenEx(
PVOID pArg1,
DWORD Flags,
FT_HANDLE *pHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_ListDevices(
PVOID pArg1,
PVOID pArg2,
DWORD Flags
);
FTD2XX_API
FT_STATUS WINAPI FT_Close(
FT_HANDLE ftHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_Read(
FT_HANDLE ftHandle,
LPVOID lpBuffer,
DWORD dwBytesToRead,
LPDWORD lpBytesReturned
);
FTD2XX_API
FT_STATUS WINAPI FT_Write(
FT_HANDLE ftHandle,
LPVOID lpBuffer,
DWORD dwBytesToWrite,
LPDWORD lpBytesWritten
);
FTD2XX_API
FT_STATUS WINAPI FT_IoCtl(
FT_HANDLE ftHandle,
DWORD dwIoControlCode,
LPVOID lpInBuf,
DWORD nInBufSize,
LPVOID lpOutBuf,
DWORD nOutBufSize,
LPDWORD lpBytesReturned,
LPOVERLAPPED lpOverlapped
);
FTD2XX_API
FT_STATUS WINAPI FT_SetBaudRate(
FT_HANDLE ftHandle,
ULONG BaudRate
);
FTD2XX_API
FT_STATUS WINAPI FT_SetDivisor(
FT_HANDLE ftHandle,
USHORT Divisor
);
FTD2XX_API
FT_STATUS WINAPI FT_SetDataCharacteristics(
FT_HANDLE ftHandle,
UCHAR WordLength,
UCHAR StopBits,
UCHAR Parity
);
FTD2XX_API
FT_STATUS WINAPI FT_SetFlowControl(
FT_HANDLE ftHandle,
USHORT FlowControl,
UCHAR XonChar,
UCHAR XoffChar
);
FTD2XX_API
FT_STATUS WINAPI FT_ResetDevice(
FT_HANDLE ftHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_SetDtr(
FT_HANDLE ftHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_ClrDtr(
FT_HANDLE ftHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_SetRts(
FT_HANDLE ftHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_ClrRts(
FT_HANDLE ftHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_GetModemStatus(
FT_HANDLE ftHandle,
ULONG *pModemStatus
);
FTD2XX_API
FT_STATUS WINAPI FT_SetChars(
FT_HANDLE ftHandle,
UCHAR EventChar,
UCHAR EventCharEnabled,
UCHAR ErrorChar,
UCHAR ErrorCharEnabled
);
FTD2XX_API
FT_STATUS WINAPI FT_Purge(
FT_HANDLE ftHandle,
ULONG Mask
);
FTD2XX_API
FT_STATUS WINAPI FT_SetTimeouts(
FT_HANDLE ftHandle,
ULONG ReadTimeout,
ULONG WriteTimeout
);
FTD2XX_API
FT_STATUS WINAPI FT_GetQueueStatus(
FT_HANDLE ftHandle,
DWORD *dwRxBytes
);
FTD2XX_API
FT_STATUS WINAPI FT_SetEventNotification(
FT_HANDLE ftHandle,
DWORD Mask,
PVOID Param
);
FTD2XX_API
FT_STATUS WINAPI FT_GetStatus(
FT_HANDLE ftHandle,
DWORD *dwRxBytes,
DWORD *dwTxBytes,
DWORD *dwEventDWord
);
FTD2XX_API
FT_STATUS WINAPI FT_SetBreakOn(
FT_HANDLE ftHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_SetBreakOff(
FT_HANDLE ftHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_SetWaitMask(
FT_HANDLE ftHandle,
DWORD Mask
);
FTD2XX_API
FT_STATUS WINAPI FT_WaitOnMask(
FT_HANDLE ftHandle,
DWORD *Mask
);
FTD2XX_API
FT_STATUS WINAPI FT_GetEventStatus(
FT_HANDLE ftHandle,
DWORD *dwEventDWord
);
FTD2XX_API
FT_STATUS WINAPI FT_ReadEE(
FT_HANDLE ftHandle,
DWORD dwWordOffset,
LPWORD lpwValue
);
FTD2XX_API
FT_STATUS WINAPI FT_WriteEE(
FT_HANDLE ftHandle,
DWORD dwWordOffset,
WORD wValue
);
FTD2XX_API
FT_STATUS WINAPI FT_EraseEE(
FT_HANDLE ftHandle
);
//
// structure to hold program data for FT_Program function
//
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
// 3 = FT2232H extensions
// 4 = FT4232H 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 & lt; MaxPower & lt; = 500
WORD PnP; // 0 = disabled, 1 = enabled
WORD SelfPowered; // 0 = bus powered, 1 = self powered
WORD RemoteWakeup; // 0 = not capable, 1 = capable
//
// Rev4 (FT232B) 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 = & gt; USB2)
//
// Rev 5 (FT2232) 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 = & gt; 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
//
// Rev 6 (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
UCHAR Cbus1; // Cbus Mux control
UCHAR Cbus2; // Cbus Mux control
UCHAR Cbus3; // Cbus Mux control
UCHAR Cbus4; // Cbus Mux control
UCHAR RIsD2XX; // non-zero if using D2XX driver
//
// Rev 7 (FT2232H) Extensions
//
UCHAR PullDownEnable7; // non-zero if pull down enabled
UCHAR SerNumEnable7; // non-zero if serial number to be used
UCHAR ALSlowSlew; // non-zero if AL pins have slow slew
UCHAR ALSchmittInput; // non-zero if AL pins are Schmitt input
UCHAR ALDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA
UCHAR AHSlowSlew; // non-zero if AH pins have slow slew
UCHAR AHSchmittInput; // non-zero if AH pins are Schmitt input
UCHAR AHDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA
UCHAR BLSlowSlew; // non-zero if BL pins have slow slew
UCHAR BLSchmittInput; // non-zero if BL pins are Schmitt input
UCHAR BLDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA
UCHAR BHSlowSlew; // non-zero if BH pins have slow slew
UCHAR BHSchmittInput; // non-zero if BH pins are Schmitt input
UCHAR BHDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA
UCHAR IFAIsFifo7; // non-zero if interface is 245 FIFO
UCHAR IFAIsFifoTar7; // non-zero if interface is 245 FIFO CPU target
UCHAR IFAIsFastSer7; // non-zero if interface is Fast serial
UCHAR AIsVCP7; // non-zero if interface is to use VCP drivers
UCHAR IFBIsFifo7; // non-zero if interface is 245 FIFO
UCHAR IFBIsFifoTar7; // non-zero if interface is 245 FIFO CPU target
UCHAR IFBIsFastSer7; // non-zero if interface is Fast serial
UCHAR BIsVCP7; // non-zero if interface is to use VCP drivers
UCHAR PowerSaveEnable; // non-zero if using BCBUS7 to save power for self-powered designs
//
// Rev 8 (FT4232H) Extensions
//
UCHAR PullDownEnable8; // non-zero if pull down enabled
UCHAR SerNumEnable8; // non-zero if serial number to be used
UCHAR ASlowSlew; // non-zero if AL pins have slow slew
UCHAR ASchmittInput; // non-zero if AL pins are Schmitt input
UCHAR ADriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA
UCHAR BSlowSlew; // non-zero if AH pins have slow slew
UCHAR BSchmittInput; // non-zero if AH pins are Schmitt input
UCHAR BDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA
UCHAR CSlowSlew; // non-zero if BL pins have slow slew
UCHAR CSchmittInput; // non-zero if BL pins are Schmitt input
UCHAR CDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA
UCHAR DSlowSlew; // non-zero if BH pins have slow slew
UCHAR DSchmittInput; // non-zero if BH pins are Schmitt input
UCHAR DDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA
UCHAR ARIIsTXDEN; // non-zero if port A uses RI as RS485 TXDEN
UCHAR BRIIsTXDEN; // non-zero if port B uses RI as RS485 TXDEN
UCHAR CRIIsTXDEN; // non-zero if port C uses RI as RS485 TXDEN
UCHAR DRIIsTXDEN; // non-zero if port D uses RI as RS485 TXDEN
UCHAR AIsVCP8; // non-zero if interface is to use VCP drivers
UCHAR BIsVCP8; // non-zero if interface is to use VCP drivers
UCHAR CIsVCP8; // non-zero if interface is to use VCP drivers
UCHAR DIsVCP8; // non-zero if interface is to use VCP drivers
} FT_PROGRAM_DATA, *PFT_PROGRAM_DATA;
FTD2XX_API
FT_STATUS WINAPI FT_EE_Program(
FT_HANDLE ftHandle,
PFT_PROGRAM_DATA pData
);
FTD2XX_API
FT_STATUS WINAPI FT_EE_ProgramEx(
FT_HANDLE ftHandle,
PFT_PROGRAM_DATA pData,
char *Manufacturer,
char *ManufacturerId,
char *Description,
char *SerialNumber
);
FTD2XX_API
FT_STATUS WINAPI FT_EE_Read(
FT_HANDLE ftHandle,
PFT_PROGRAM_DATA pData
);
FTD2XX_API
FT_STATUS WINAPI FT_EE_ReadEx(
FT_HANDLE ftHandle,
PFT_PROGRAM_DATA pData,
char *Manufacturer,
char *ManufacturerId,
char *Description,
char *SerialNumber
);
FTD2XX_API
FT_STATUS WINAPI FT_EE_UASize(
FT_HANDLE ftHandle,
LPDWORD lpdwSize
);
FTD2XX_API
FT_STATUS WINAPI FT_EE_UAWrite(
FT_HANDLE ftHandle,
PUCHAR pucData,
DWORD dwDataLen
);
FTD2XX_API
FT_STATUS WINAPI FT_EE_UARead(
FT_HANDLE ftHandle,
PUCHAR pucData,
DWORD dwDataLen,
LPDWORD lpdwBytesRead
);
FTD2XX_API
FT_STATUS WINAPI FT_SetLatencyTimer(
FT_HANDLE ftHandle,
UCHAR ucLatency
);
FTD2XX_API
FT_STATUS WINAPI FT_GetLatencyTimer(
FT_HANDLE ftHandle,
PUCHAR pucLatency
);
FTD2XX_API
FT_STATUS WINAPI FT_SetBitMode(
FT_HANDLE ftHandle,
UCHAR ucMask,
UCHAR ucEnable
);
FTD2XX_API
FT_STATUS WINAPI FT_GetBitMode(
FT_HANDLE ftHandle,
PUCHAR pucMode
);
FTD2XX_API
FT_STATUS WINAPI FT_SetUSBParameters(
FT_HANDLE ftHandle,
ULONG ulInTransferSize,
ULONG ulOutTransferSize
);
FTD2XX_API
FT_STATUS WINAPI FT_SetDeadmanTimeout(
FT_HANDLE ftHandle,
ULONG ulDeadmanTimeout
);
FTD2XX_API
FT_STATUS WINAPI FT_GetDeviceInfo(
FT_HANDLE ftHandle,
FT_DEVICE *lpftDevice,
LPDWORD lpdwID,
PCHAR SerialNumber,
PCHAR Description,
LPVOID Dummy
);
FTD2XX_API
FT_STATUS WINAPI FT_StopInTask(
FT_HANDLE ftHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_RestartInTask(
FT_HANDLE ftHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_SetResetPipeRetryCount(
FT_HANDLE ftHandle,
DWORD dwCount
);
FTD2XX_API
FT_STATUS WINAPI FT_ResetPort(
FT_HANDLE ftHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_CyclePort(
FT_HANDLE ftHandle
);
//
// Win32-type functions
//
FTD2XX_API
FT_HANDLE WINAPI FT_W32_CreateFile(
LPCTSTR lpszName,
DWORD dwAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreate,
DWORD dwAttrsAndFlags,
HANDLE hTemplate
);
FTD2XX_API
BOOL WINAPI FT_W32_CloseHandle(
FT_HANDLE ftHandle
);
FTD2XX_API
BOOL WINAPI FT_W32_ReadFile(
FT_HANDLE ftHandle,
LPVOID lpBuffer,
DWORD nBufferSize,
LPDWORD lpBytesReturned,
LPOVERLAPPED lpOverlapped
);
FTD2XX_API
BOOL WINAPI FT_W32_WriteFile(
FT_HANDLE ftHandle,
LPVOID lpBuffer,
DWORD nBufferSize,
LPDWORD lpBytesWritten,
LPOVERLAPPED lpOverlapped
);
FTD2XX_API
DWORD WINAPI FT_W32_GetLastError(
FT_HANDLE ftHandle
);
FTD2XX_API
BOOL WINAPI FT_W32_GetOverlappedResult(
FT_HANDLE ftHandle,
LPOVERLAPPED lpOverlapped,
LPDWORD lpdwBytesTransferred,
BOOL bWait
);
FTD2XX_API
BOOL WINAPI FT_W32_CancelIo(
FT_HANDLE ftHandle
);
//
// Win32 COMM API type functions
//
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;
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, 4-8 */
BYTE Parity; /* 0-4=None,Odd,Even,Mark,Space */
BYTE StopBits; /* 0,1,2 = 1, 1.5, 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 for now. */
} FTDCB, *LPFTDCB;
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;
FTD2XX_API
BOOL WINAPI FT_W32_ClearCommBreak(
FT_HANDLE ftHandle
);
FTD2XX_API
BOOL WINAPI FT_W32_ClearCommError(
FT_HANDLE ftHandle,
LPDWORD lpdwErrors,
LPFTCOMSTAT lpftComstat
);
FTD2XX_API
BOOL WINAPI FT_W32_EscapeCommFunction(
FT_HANDLE ftHandle,
DWORD dwFunc
);
FTD2XX_API
BOOL WINAPI FT_W32_GetCommModemStatus(
FT_HANDLE ftHandle,
LPDWORD lpdwModemStatus
);
FTD2XX_API
BOOL WINAPI FT_W32_GetCommState(
FT_HANDLE ftHandle,
LPFTDCB lpftDcb
);
FTD2XX_API
BOOL WINAPI FT_W32_GetCommTimeouts(
FT_HANDLE ftHandle,
FTTIMEOUTS *pTimeouts
);
FTD2XX_API
BOOL WINAPI FT_W32_PurgeComm(
FT_HANDLE ftHandle,
DWORD dwMask
);
FTD2XX_API
BOOL WINAPI FT_W32_SetCommBreak(
FT_HANDLE ftHandle
);
FTD2XX_API
BOOL WINAPI FT_W32_SetCommMask(
FT_HANDLE ftHandle,
ULONG ulEventMask
);
FTD2XX_API
BOOL WINAPI FT_W32_GetCommMask(
FT_HANDLE ftHandle,
LPDWORD lpdwEventMask
);
FTD2XX_API
BOOL WINAPI FT_W32_SetCommState(
FT_HANDLE ftHandle,
LPFTDCB lpftDcb
);
FTD2XX_API
BOOL WINAPI FT_W32_SetCommTimeouts(
FT_HANDLE ftHandle,
FTTIMEOUTS *pTimeouts
);
FTD2XX_API
BOOL WINAPI FT_W32_SetupComm(
FT_HANDLE ftHandle,
DWORD dwReadBufferSize,
DWORD dwWriteBufferSize
);
FTD2XX_API
BOOL WINAPI FT_W32_WaitCommEvent(
FT_HANDLE ftHandle,
PULONG pulEvent,
LPOVERLAPPED lpOverlapped
);
//
// Device information
//
typedef struct _ft_device_list_info_node {
ULONG Flags;
ULONG Type;
ULONG ID;
DWORD LocId;
char SerialNumber[16];
char Description[64];
FT_HANDLE ftHandle;
} FT_DEVICE_LIST_INFO_NODE;
// Device information flags
enum {
FT_FLAGS_OPENED = 1,
FT_FLAGS_HISPEED = 2
};
FTD2XX_API
FT_STATUS WINAPI FT_CreateDeviceInfoList(
LPDWORD lpdwNumDevs
);
FTD2XX_API
FT_STATUS WINAPI FT_GetDeviceInfoList(
FT_DEVICE_LIST_INFO_NODE *pDest,
LPDWORD lpdwNumDevs
);
FTD2XX_API
FT_STATUS WINAPI FT_GetDeviceInfoDetail(
DWORD dwIndex,
LPDWORD lpdwFlags,
LPDWORD lpdwType,
LPDWORD lpdwID,
LPDWORD lpdwLocId,
LPVOID lpSerialNumber,
LPVOID lpDescription,
FT_HANDLE *pftHandle
);
//
// Version information
//
FTD2XX_API
FT_STATUS WINAPI FT_GetDriverVersion(
FT_HANDLE ftHandle,
LPDWORD lpdwVersion
);
FTD2XX_API
FT_STATUS WINAPI FT_GetLibraryVersion(
LPDWORD lpdwVersion
);
FTD2XX_API
FT_STATUS WINAPI FT_Rescan(
void
);
FTD2XX_API
FT_STATUS WINAPI FT_Reload(
WORD wVid,
WORD wPid
);
FTD2XX_API
FT_STATUS WINAPI FT_GetComPortNumber(
FT_HANDLE ftHandle,
LPLONG lpdwComPortNumber
);
#ifdef __cplusplus
}
#endif
#endif /* FTD2XX_H */
FTDI CDM Drivers 2.04.16 - Revision Comments
FTDI's CDM drivers provide both D2XX and VCP functionality through a
single driver package on PCs running the following Windows operating
systems:
Windows Server 2008
Windows Server 2008 x64
Windows Vista
Windows Vista x64
Windows Server 2003
Windows Server 2003 x64
Windows XP
Windows XP x64
Windows 2000
The files included in a standard CDM release are:
Installation files
FTDIBUS.INF
FTDIPORT.INF
Driver files
FTDIBUS.SYS
FTSER2K.SYS
D2XX Interface
FTD2XX.DLL (32-bit)
FTD2XX.DLL (64-bit)
FTD2XX.LIB (32-bit)
FTD2XX.LIB (64-bit)
FTD2XX.H
Supporting files
FTLang.DLL (32-bit)
FTLang.DLL (64-bit)
FTCSERCO.DLL (32-bit)
FTCSERCO.DLL (64-bit)
On making a new release the files will be posted on FTDI's web site
HYPERLINK " http://www.ftdichip.com " http://www.ftdichip.com
/FTDrivers.htm in ZIP file format.
Release version
2.04.16 (February 17, 2009)
WHQL certified version with various bug fixes and enhancements.
Release Fixes
Fix power management issue.
Additional protection in serial driver.
Release version
2.04.14 (October 27, 2008)
WHQL candidate version with various bug fixes and enhancements.
Release Fixes
Added more languages to FTLang:
Finnish
Added support for FT2232H and FT4232H.
Prevent users from programming EEPROMs with VID or PID of 0x0000.
Fixed rare installation problem on Windows Server 2003 x64.
Fixed problem with USB 2.0 hub enumeration.
Fix for DTM rebalance test.
Force endpoint size in FT232R/FT245R EEPROM structure to always be 64.
Added FT_EVENT_LINE_STATUS for use with FT_SetEventNotification.
Fixed LocIds bugs.
Release version
2.04.06 (March 13, 2008)
WHQL certified version with various bug fixes and enhancements.
Release Fixes
Added multilingual support to property page via FTLang.DLL. Supported
languages are:
English (Default)
Chinese (Traditional)
French
German
Hungarian
Italian
Japanese
Korean
Polish
Russian
Spanish
Added FT_GetComPortNumber function.
Added Line Status to IOCTL_FT_GET_MODEM_STATUS.
Changes to write request processing to fix blue screen.
Fixed FT_ResetDevice for FT2232.
Fixes for Windows error report crashes.
Fixed synchronisation issue.
Fixed deadlock issues for multi-processor systems.
Fixed error condition state in suspend.
Revised co-installer.
Support for COM port disabled in device manager (as opposed to disabled
though property page).
Fixed synchronization issue if comport installation was incomplete.
Fixed device info list issues: list not populated when using Win32
functions
Now return default info for devices open in other processes.
Fixed lock-up problem in Vista and XP.
Fixed USB 2.0 location ID problem on Windows 2000.
Release version
2.02.04 (July 3, 2007)
WHQL certified version. New driver architecture combining 32-bit OS
driver and 64-bit OS driver.
Release Fixes
Code fixes for PreFast and SDV.
Fix write timeouts.
Changed write request processing for DVDO box.
Use LocIds for creating com ports if using IgnoreHWSerNum.
Various fixes for PreFast.
Remove references to 5-6 data bits and 1.5 stop bits.
Fix blue screen in checked build serial driver.
Power management fast resume for Vista.
Fixed LocID problem with usb2.0 hubs on Win2K.
Synchronize D2XX open and serial port startup.
Fixed object name collision problem in VCP.
Fixed WER 0xD1_W_ftdibus!FT_WriteTimeoutProc+2c.
Release Version
2.00.00r (May 18, 2006)
WHQL certified version. New driver architecture combining functionality
of D2XX and VCP drivers.
Release Fixes
Removed unused fields from device extension.
Fixed write timeout bytes returned problem.
Changes for power management
Fix for buffer full handshake problem.
Combined driver model.
Added workaround for R-chip bad serial number problem.
Fixed bug in device startup.
Fixed vendor request queuing lockup problem.
Changed device ID creation to fix problem seen in 64-bit OS.
Fixed lockup problem with hardware handshake (3-write problem) by
restoring timeouts for OUT requests.
Fixed disconnect after hibernate problem.
Fixed disconnect during open session with active communications problem.
Previous Release Revisions
1.00.2176 (December 12, 2005)
WHQL certified version. Fixed installation problem.
1.00.2172 (October 31, 2005)
Support for FT2232C devices.
1.00.2170 (October 27, 2005)
Fixed write request synchronization issue.
1.00.2169 (September 1, 2005)
Fixed flow control issues.
Changed cancel processing to fix blue screen.
1.00.2168 (June 8, 2005)
Fixed lockup condition on port close.
1.00.2166 (May 23, 2005)
Fixed bug in software flow control.
1.00.2163 (February 7, 2005)
Support for buffered writes.
Fixed property page.
1.00.2162 (November 25, 2004)
Tested with HCT 12.0.
1.00.2160 (October 26, 2004)
Added option to prevent modem control signals following legacy port
behaviour at startup.
1.00.2159 (October 15, 2004)
Fixed delay on disconnect under WinXP.
1.00.2157 (September 28, 2004)
Fixed bug that could cause computer to hang during closedown.
1.00.2156 (September 9, 2004)
Fixed bug in baud rate divisor calculation for AM devices.
Location Ids supported is no longer restricted to 10 or less.
Fixed bug that could cause computer to hang on surprise removal.
Fixed bug that caused device handle notification to fail.
1.00.2154 (April 20, 2004)
WHQL certified version.
Fixed initialization problem on WinXP SP1.
Fixed IOCTL_SERIAL_GET_DTRRTS.
1.00.2151 (February 4, 2004)
Fixed problem with signalling events on disconnect with open port.
1.00.2150 (January 19, 2004)
Fixed problem with signalling line status errors.
Fixed problem with Location IDs and external hubs.
1.00.2148 (November 11, 2003)
More fixes for WHQL.
Fixed problem that prevented RXCHAR event being signalled when buffers
were full.
1.00.2146 (October 28, 2003)
Various fixes for WHQL.
Added option for immediate processing of vendor commands.
1.00.2145 (October 20, 2003)
Fixed power-level problem with VCP serializer DLL interface.
1.00.2143 (September 24, 2003)
Fixed problem with RTS control toggle mode.
Fixed problem with device state after suspend/resume.
1.00.2140 (September 11, 2003)
Fixed problem with uninstall from DeviceManager.
Fixed problem with Sandstorm software.
Improved device request processing.
Fixed problem with modem control signal state on open.
Fixed cancel write request problem.
Added reset pipe retry count.
Added maximum devices option.
Added supported locations option.
1.00.2134 (June 16, 2003)
More changes for BusHound.
1.00.2133 (June 12, 2003)
Fixed BusHound compatibility problem.
Updated properties page with serial enumerator option.
1.00.2132 (June 09, 2003)
Bug fixes for substitution mode.
Fixed problem where laptops could not enter standby mode.
Fixed problem with Lexmark printer.
Added " Set RTS on Close " flag.
Updated properties page.
1.00.2126 (April 10, 2003)
Support substitution mode.
Restore device state on return from suspend or hibernate.
Fixed device naming problem.
Fixed bug in purge when receive buffer full.
Fixed bug in properties page.
1.00.2115 (February 25, 2003)
Beta release includes drivers that have passed Microsoft certification
tests.
1.00.2115 (December 20, 2002)
Beta release.
Support force XON/XOFF option.
New properties page.
1.00.2114 (November 1, 2002)
Beta release.
Correctly identifies unserialized FT232BM and FT245BM devices.
Fixed remote wakeup.
1.00.2112 (October 25, 2002)
Beta release.
Support for FT232BM and FT245BM.
Uses location information to enumerate non-serialized devices.
1.00.2104 (July 22, 2002)
Drivers digitally signed.
1.00.2101 (February 1, 2002)
Fixed problem that resulted in some devices not coming out of hibernate.
Fixed divide-by-zero problem zero baud rate.
1.00.2099 (January 7, 2002)
Fixed problem with aliased baud rates.
1.00.2098 (December 20, 2001)
Improved transmit throughput.
Support serial printers through Registry setting.
Support for non-standard baud rates.
Support Transmit Immediate.
Disable modem control signals on port close.
Fixed serial mouse disconnect problem in Standby mode.
Runs under driver verifier.
1.00.2088 (October 30, 2001)
Fixed connect/disconnect problem in Windows XP.
Runs under driver verifier in Windows XP.
1.00.2086 (October 5, 2001)
Fixed write request timeout processing.
Fixed problem with restarting writes after port close.
Fixed no space in read buffer problem.
1.00.2084 (October 2, 2001)
Passes HCT tests (required for Windows XP Logo).
Uses common uninstaller FTDIUNIN.EXE.
Fixed minimum timeout problem.
Fixed write request blue screen.
Fixed write request timeout processing.
Fixed data loss at low baud rates.
1.00.2078 (July 27, 2001)
Fixed support for Logitech mice.
Enhanced write request processing.
1.00.2072 (May 2, 2001)
Runs under Windows XP.
Fixed receive buffer full problem.
1.00.2071 (Apr 26, 2001)
Enhanced BREAK condition processing.
1.00.2069 (Mar 28, 2001)
Fixed hyper-terminal re-boot problem seen when transmitting files at low
baud rates.
1.00.2068 (Mar 23, 2001)
Drop modem status signals on disconnect
1.00.2067 (Feb 26, 2001)
Fixed disconnect with open port problems
Support multiple devices attached at the same time
Fixed hyper-terminal re-boot problem seen when typing characters in
terminal screen
Enabled for surprise removal (removes unexpected removal dialogue box)
1.00.2060 (Jan 19, 2001)
Change to modem status register set up to improve port initialisation
1.00.2058 (Nov 7, 2000)
Fix to changing buffer size under Windows 2000 for FT8U232AM and
FT8U245AM
1.00.2057 (Oct 19, 2000)
Fix to enable speeds greater then 115k baud for FT8U232AM and FT8U245AM
1.00.2055 (Sept 7, 2000)
Support for common INF for Win98 and Win2k drivers
Update of INF to support FT8U232AM and FT8U245AM
1.00.2054 (Aug 10, 2000)
Increased time out delay to make enumerator performance more robust
1.00.2053 (Aug 9, 2000)
Fixed transmit toggle problem
1.00.2052 (July 24, 2000)
Driver stack made consistent to fix device power state failure
INF changes to add serial services
1.00.2051 (June 15, 2000)
Fixed problem with 230k baud select, IN transfer restriction of 64
bytes removed
Fixed X-ON/X-OFF handshaking problem, added support for serial mouse
1.00.2049 (Mar 25, 2000)
Install / uninstall for new naming (ftser2k)
1.00.2046 (Mar 15, 2000)
New naming format: ftserial - & gt; ftser2k
1.00.2044 (Mar 8, 2000)
Update to fix problem with Direct Cable Connect
1.00.2041 (Mar 3, 2000)
Fixed problem with baud rate selection
1.00.2040 (Mar 1, 2000)
Removed FTDI uninstaller
1.00.0 Beta (Feb 21, 2000)
Update to improve flow control
Alpha100 (Feb 18, 2000) - first release
Connects to ISP. Some flow control problems.