Line 1... |
Line 1... |
1 |
/*++ |
1 |
/*++ |
2 |
|
2 |
|
3 |
Copyright (c) 2001-2011 Future Technology Devices International Limited |
3 |
Copyright © 2001-2011 Future Technology Devices International Limited |
4 |
|
4 |
|
5 |
THIS SOFTWARE IS PROVIDED BY FUTURE TECHNOLOGY DEVICES INTERNATIONAL LIMITED "AS IS" |
5 |
THIS SOFTWARE IS PROVIDED BY FUTURE TECHNOLOGY DEVICES INTERNATIONAL LIMITED "AS IS" |
6 |
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
6 |
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
7 |
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL |
7 |
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL |
8 |
FUTURE TECHNOLOGY DEVICES INTERNATIONAL LIMITED BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
8 |
FUTURE TECHNOLOGY DEVICES INTERNATIONAL LIMITED BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
9 |
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT |
9 |
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT |
10 |
OF SUBSTITUTE GOODS OR SERVICES LOSS OF USE, DATA, OR PROFITS OR BUSINESS INTERRUPTION) |
10 |
OF SUBSTITUTE GOODS OR SERVICES LOSS OF USE, DATA, OR PROFITS OR BUSINESS INTERRUPTION) |
11 |
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR |
11 |
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR |
12 |
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
12 |
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
13 |
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
13 |
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
14 |
|
14 |
|
15 |
FTDI DRIVERS MAY BE USED ONLY IN CONJUNCTION WITH PRODUCTS BASED ON FTDI PARTS. |
15 |
FTDI DRIVERS MAY BE USED ONLY IN CONJUNCTION WITH PRODUCTS BASED ON FTDI PARTS. |
16 |
|
16 |
|
17 |
FTDI DRIVERS MAY BE DISTRIBUTED IN ANY FORM AS LONG AS LICENSE INFORMATION IS NOT MODIFIED. |
17 |
FTDI DRIVERS MAY BE DISTRIBUTED IN ANY FORM AS LONG AS LICENSE INFORMATION IS NOT MODIFIED. |
18 |
|
18 |
|
19 |
IF A CUSTOM VENDOR ID AND/OR PRODUCT ID OR DESCRIPTION STRING ARE USED, IT IS THE |
19 |
IF A CUSTOM VENDOR ID AND/OR PRODUCT ID OR DESCRIPTION STRING ARE USED, IT IS THE |
20 |
RESPONSIBILITY OF THE PRODUCT MANUFACTURER TO MAINTAIN ANY CHANGES AND SUBSEQUENT WHQL |
20 |
RESPONSIBILITY OF THE PRODUCT MANUFACTURER TO MAINTAIN ANY CHANGES AND SUBSEQUENT WHQL |
21 |
RE-CERTIFICATION AS A RESULT OF MAKING THESE CHANGES. |
21 |
RE-CERTIFICATION AS A RESULT OF MAKING THESE CHANGES. |
22 |
|
22 |
|
23 |
|
23 |
|
24 |
Module Name: |
24 |
Module Name: |
25 |
|
25 |
|
26 |
ftd2xx.h |
26 |
ftd2xx.h |
27 |
|
27 |
|
28 |
Abstract: |
28 |
Abstract: |
29 |
|
29 |
|
30 |
Native USB device driver for FTDI FT232x, FT245x, FT2232x and FT4232x devices |
30 |
Native USB device driver for FTDI FT232x, FT245x, FT2232x and FT4232x devices |
31 |
FTD2XX library definitions |
31 |
FTD2XX library definitions |
32 |
|
32 |
|
33 |
Environment: |
33 |
Environment: |
34 |
|
34 |
|
35 |
user mode |
35 |
kernel & user mode |
36 |
|
36 |
|
37 |
|
37 |
|
38 |
--*/ |
38 |
--*/ |
39 |
|
39 |
|
40 |
|
40 |
|
41 |
#ifndef FTD2XX_H |
41 |
#ifndef FTD2XX_H |
42 |
#define FTD2XX_H |
42 |
#define FTD2XX_H |
43 |
|
43 |
|
44 |
#ifndef _WINDOWS |
44 |
#ifdef _WIN32 |
45 |
#include <pthread.h> |
45 |
// Compiling on Windows |
46 |
#define WINAPI |
46 |
#include <windows.h> |
47 |
#endif |
47 |
|
48 |
|
48 |
// The following ifdef block is the standard way of creating macros |
49 |
// The following ifdef block is the standard way of creating macros |
49 |
// which make exporting from a DLL simpler. All files within this DLL |
50 |
// which make exporting from a DLL simpler. All files within this DLL |
50 |
// are compiled with the FTD2XX_EXPORTS symbol defined on the command line. |
51 |
// are compiled with the FTD2XX_EXPORTS symbol defined on the command line. |
51 |
// This symbol should not be defined on any project that uses this DLL. |
52 |
// This symbol should not be defined on any project that uses this DLL. |
52 |
// This way any other project whose source files include this file see |
53 |
// This way any other project whose source files include this file see |
53 |
// FTD2XX_API functions as being imported from a DLL, whereas this DLL |
54 |
// FTD2XX_API functions as being imported from a DLL, whereas this DLL |
54 |
// sees symbols defined with this macro as being exported. |
55 |
// sees symbols defined with this macro as being exported. |
55 |
|
56 |
|
56 |
#ifdef FTD2XX_EXPORTS |
57 |
#ifdef FTD2XX_EXPORTS |
57 |
#define FTD2XX_API __declspec(dllexport) |
58 |
#define FTD2XX_API __declspec(dllexport) |
58 |
#elif defined(FTD2XX_STATIC) |
59 |
#else |
59 |
// Avoid decorations when linking statically to D2XX. |
60 |
#define FTD2XX_API __declspec(dllimport) |
60 |
#define FTD2XX_API |
61 |
#endif |
61 |
#else |
62 |
|
62 |
#define FTD2XX_API __declspec(dllimport) |
63 |
#ifndef _WINDOWS |
63 |
#endif |
64 |
#include "WinTypes.h" |
64 |
|
65 |
|
65 |
#else // _WIN32 |
66 |
#ifdef FTD2XX_API |
66 |
// Compiling on non-Windows platform. |
67 |
#undef FTD2XX_API |
67 |
#include "WinTypes.h" |
68 |
#define FTD2XX_API |
68 |
// No decorations needed. |
69 |
#endif |
69 |
#define FTD2XX_API |
70 |
#endif |
70 |
|
71 |
typedef struct _EVENT_HANDLE{ |
71 |
#endif // _WIN32 |
72 |
pthread_cond_t eCondVar; |
72 |
|
73 |
pthread_mutex_t eMutex; |
73 |
typedef PVOID FT_HANDLE; |
74 |
int iVar; |
74 |
typedef ULONG FT_STATUS; |
75 |
} EVENT_HANDLE; |
75 |
|
76 |
|
76 |
// |
77 |
typedef PVOID FT_HANDLE; |
77 |
// Device status |
78 |
typedef ULONG FT_STATUS; |
78 |
// |
79 |
|
79 |
enum { |
80 |
// |
80 |
FT_OK, |
81 |
// Device status |
81 |
FT_INVALID_HANDLE, |
82 |
// |
82 |
FT_DEVICE_NOT_FOUND, |
83 |
enum { |
83 |
FT_DEVICE_NOT_OPENED, |
84 |
FT_OK, |
84 |
FT_IO_ERROR, |
85 |
FT_INVALID_HANDLE, |
85 |
FT_INSUFFICIENT_RESOURCES, |
86 |
FT_DEVICE_NOT_FOUND, |
86 |
FT_INVALID_PARAMETER, |
87 |
FT_DEVICE_NOT_OPENED, |
87 |
FT_INVALID_BAUD_RATE, |
88 |
FT_IO_ERROR, |
88 |
|
89 |
FT_INSUFFICIENT_RESOURCES, |
89 |
FT_DEVICE_NOT_OPENED_FOR_ERASE, |
90 |
FT_INVALID_PARAMETER, |
90 |
FT_DEVICE_NOT_OPENED_FOR_WRITE, |
91 |
FT_INVALID_BAUD_RATE, //7 |
91 |
FT_FAILED_TO_WRITE_DEVICE, |
92 |
|
92 |
FT_EEPROM_READ_FAILED, |
93 |
FT_DEVICE_NOT_OPENED_FOR_ERASE, |
93 |
FT_EEPROM_WRITE_FAILED, |
94 |
FT_DEVICE_NOT_OPENED_FOR_WRITE, |
94 |
FT_EEPROM_ERASE_FAILED, |
95 |
FT_FAILED_TO_WRITE_DEVICE, |
95 |
FT_EEPROM_NOT_PRESENT, |
96 |
FT_EEPROM_READ_FAILED, |
96 |
FT_EEPROM_NOT_PROGRAMMED, |
97 |
FT_EEPROM_WRITE_FAILED, |
97 |
FT_INVALID_ARGS, |
98 |
FT_EEPROM_ERASE_FAILED, |
98 |
FT_NOT_SUPPORTED, |
99 |
FT_EEPROM_NOT_PRESENT, |
99 |
FT_OTHER_ERROR, |
100 |
FT_EEPROM_NOT_PROGRAMMED, |
100 |
FT_DEVICE_LIST_NOT_READY, |
101 |
FT_INVALID_ARGS, |
101 |
}; |
102 |
FT_NOT_SUPPORTED, |
102 |
|
103 |
FT_OTHER_ERROR |
103 |
|
104 |
}; |
104 |
#define FT_SUCCESS(status) ((status) == FT_OK) |
105 |
|
105 |
|
106 |
|
106 |
// |
107 |
#define FT_SUCCESS(status) ((status) == FT_OK) |
107 |
// FT_OpenEx Flags |
108 |
|
108 |
// |
109 |
// |
109 |
|
110 |
// FT_OpenEx Flags |
110 |
#define FT_OPEN_BY_SERIAL_NUMBER 1 |
111 |
// |
111 |
#define FT_OPEN_BY_DESCRIPTION 2 |
112 |
|
112 |
#define FT_OPEN_BY_LOCATION 4 |
113 |
#define FT_OPEN_BY_SERIAL_NUMBER 1 |
113 |
|
114 |
#define FT_OPEN_BY_DESCRIPTION 2 |
114 |
#define FT_OPEN_MASK (FT_OPEN_BY_SERIAL_NUMBER | \ |
115 |
#define FT_OPEN_BY_LOCATION 4 |
115 |
FT_OPEN_BY_DESCRIPTION | \ |
116 |
|
116 |
FT_OPEN_BY_LOCATION) |
117 |
// |
117 |
|
118 |
// FT_ListDevices Flags (used in conjunction with FT_OpenEx Flags |
118 |
// |
119 |
// |
119 |
// FT_ListDevices Flags (used in conjunction with FT_OpenEx Flags |
120 |
|
120 |
// |
121 |
#define FT_LIST_NUMBER_ONLY 0x80000000 |
121 |
|
122 |
#define FT_LIST_BY_INDEX 0x40000000 |
122 |
#define FT_LIST_NUMBER_ONLY 0x80000000 |
123 |
#define FT_LIST_ALL 0x20000000 |
123 |
#define FT_LIST_BY_INDEX 0x40000000 |
124 |
|
124 |
#define FT_LIST_ALL 0x20000000 |
125 |
#define FT_LIST_MASK (FT_LIST_NUMBER_ONLY|FT_LIST_BY_INDEX|FT_LIST_ALL) |
125 |
|
126 |
|
126 |
#define FT_LIST_MASK (FT_LIST_NUMBER_ONLY|FT_LIST_BY_INDEX|FT_LIST_ALL) |
127 |
// |
127 |
|
128 |
// Baud Rates |
128 |
// |
129 |
// |
129 |
// Baud Rates |
130 |
|
130 |
// |
131 |
#define FT_BAUD_300 300 |
131 |
|
132 |
#define FT_BAUD_600 600 |
132 |
#define FT_BAUD_300 300 |
133 |
#define FT_BAUD_1200 1200 |
133 |
#define FT_BAUD_600 600 |
134 |
#define FT_BAUD_2400 2400 |
134 |
#define FT_BAUD_1200 1200 |
135 |
#define FT_BAUD_4800 4800 |
135 |
#define FT_BAUD_2400 2400 |
136 |
#define FT_BAUD_9600 9600 |
136 |
#define FT_BAUD_4800 4800 |
137 |
#define FT_BAUD_14400 14400 |
137 |
#define FT_BAUD_9600 9600 |
138 |
#define FT_BAUD_19200 19200 |
138 |
#define FT_BAUD_14400 14400 |
139 |
#define FT_BAUD_38400 38400 |
139 |
#define FT_BAUD_19200 19200 |
140 |
#define FT_BAUD_57600 57600 |
140 |
#define FT_BAUD_38400 38400 |
141 |
#define FT_BAUD_115200 115200 |
141 |
#define FT_BAUD_57600 57600 |
142 |
#define FT_BAUD_230400 230400 |
142 |
#define FT_BAUD_115200 115200 |
143 |
#define FT_BAUD_460800 460800 |
143 |
#define FT_BAUD_230400 230400 |
144 |
#define FT_BAUD_921600 921600 |
144 |
#define FT_BAUD_460800 460800 |
145 |
|
145 |
#define FT_BAUD_921600 921600 |
146 |
// |
146 |
|
147 |
// Word Lengths |
147 |
// |
148 |
// |
148 |
// Word Lengths |
149 |
|
149 |
// |
150 |
#define FT_BITS_8 (UCHAR) 8 |
150 |
|
151 |
#define FT_BITS_7 (UCHAR) 7 |
151 |
#define FT_BITS_8 (UCHAR) 8 |
152 |
|
152 |
#define FT_BITS_7 (UCHAR) 7 |
153 |
// |
153 |
|
154 |
// Stop Bits |
154 |
// |
155 |
// |
155 |
// Stop Bits |
156 |
|
156 |
// |
157 |
#define FT_STOP_BITS_1 (UCHAR) 0 |
157 |
|
158 |
#define FT_STOP_BITS_2 (UCHAR) 2 |
158 |
#define FT_STOP_BITS_1 (UCHAR) 0 |
159 |
|
159 |
#define FT_STOP_BITS_2 (UCHAR) 2 |
160 |
// |
160 |
|
161 |
// Parity |
161 |
// |
162 |
// |
162 |
// Parity |
163 |
|
163 |
// |
164 |
#define FT_PARITY_NONE (UCHAR) 0 |
164 |
|
165 |
#define FT_PARITY_ODD (UCHAR) 1 |
165 |
#define FT_PARITY_NONE (UCHAR) 0 |
166 |
#define FT_PARITY_EVEN (UCHAR) 2 |
166 |
#define FT_PARITY_ODD (UCHAR) 1 |
167 |
#define FT_PARITY_MARK (UCHAR) 3 |
167 |
#define FT_PARITY_EVEN (UCHAR) 2 |
168 |
#define FT_PARITY_SPACE (UCHAR) 4 |
168 |
#define FT_PARITY_MARK (UCHAR) 3 |
169 |
|
169 |
#define FT_PARITY_SPACE (UCHAR) 4 |
170 |
// |
170 |
|
171 |
// Flow Control |
171 |
// |
172 |
// |
172 |
// Flow Control |
173 |
|
173 |
// |
174 |
#define FT_FLOW_NONE 0x0000 |
174 |
|
175 |
#define FT_FLOW_RTS_CTS 0x0100 |
175 |
#define FT_FLOW_NONE 0x0000 |
176 |
#define FT_FLOW_DTR_DSR 0x0200 |
176 |
#define FT_FLOW_RTS_CTS 0x0100 |
177 |
#define FT_FLOW_XON_XOFF 0x0400 |
177 |
#define FT_FLOW_DTR_DSR 0x0200 |
178 |
|
178 |
#define FT_FLOW_XON_XOFF 0x0400 |
179 |
// |
179 |
|
180 |
// Purge rx and tx buffers |
180 |
// |
181 |
// |
181 |
// Purge rx and tx buffers |
182 |
#define FT_PURGE_RX 1 |
182 |
// |
183 |
#define FT_PURGE_TX 2 |
183 |
#define FT_PURGE_RX 1 |
184 |
|
184 |
#define FT_PURGE_TX 2 |
185 |
// |
185 |
|
186 |
// Events |
186 |
// |
187 |
// |
187 |
// Events |
188 |
|
188 |
// |
189 |
typedef void (*PFT_EVENT_HANDLER)(DWORD,DWORD); |
189 |
|
190 |
|
190 |
typedef void (*PFT_EVENT_HANDLER)(DWORD,DWORD); |
191 |
#define FT_EVENT_RXCHAR 1 |
191 |
|
192 |
#define FT_EVENT_MODEM_STATUS 2 |
192 |
#define FT_EVENT_RXCHAR 1 |
193 |
#define FT_EVENT_LINE_STATUS 4 |
193 |
#define FT_EVENT_MODEM_STATUS 2 |
194 |
|
194 |
#define FT_EVENT_LINE_STATUS 4 |
195 |
// |
195 |
|
196 |
// Timeouts |
196 |
// |
197 |
// |
197 |
// Timeouts |
198 |
|
198 |
// |
199 |
#define FT_DEFAULT_RX_TIMEOUT 300 |
199 |
|
200 |
#define FT_DEFAULT_TX_TIMEOUT 300 |
200 |
#define FT_DEFAULT_RX_TIMEOUT 300 |
201 |
|
201 |
#define FT_DEFAULT_TX_TIMEOUT 300 |
202 |
// |
202 |
|
203 |
// Device types |
203 |
// |
204 |
// |
204 |
// Device types |
205 |
|
205 |
// |
206 |
typedef ULONG FT_DEVICE; |
206 |
|
207 |
|
207 |
typedef ULONG FT_DEVICE; |
208 |
enum { |
208 |
|
209 |
FT_DEVICE_BM, |
209 |
enum { |
210 |
FT_DEVICE_AM, |
210 |
FT_DEVICE_BM, |
211 |
FT_DEVICE_100AX, |
211 |
FT_DEVICE_AM, |
212 |
FT_DEVICE_UNKNOWN, |
212 |
FT_DEVICE_100AX, |
213 |
FT_DEVICE_2232C, |
213 |
FT_DEVICE_UNKNOWN, |
214 |
FT_DEVICE_232R, |
214 |
FT_DEVICE_2232C, |
215 |
FT_DEVICE_2232H, |
215 |
FT_DEVICE_232R, |
216 |
FT_DEVICE_4232H, |
216 |
FT_DEVICE_2232H, |
217 |
FT_DEVICE_232H |
217 |
FT_DEVICE_4232H, |
218 |
}; |
218 |
FT_DEVICE_232H, |
219 |
|
219 |
FT_DEVICE_X_SERIES, |
220 |
// |
220 |
FT_DEVICE_4222H_0, |
221 |
// Bit Modes |
221 |
FT_DEVICE_4222H_1_2, |
222 |
// |
222 |
FT_DEVICE_4222H_3, |
223 |
|
223 |
FT_DEVICE_4222_PROG, |
224 |
#define FT_BITMODE_RESET 0x00 |
224 |
}; |
225 |
#define FT_BITMODE_ASYNC_BITBANG 0x01 |
225 |
|
226 |
#define FT_BITMODE_MPSSE 0x02 |
226 |
// |
227 |
#define FT_BITMODE_SYNC_BITBANG 0x04 |
227 |
// Bit Modes |
228 |
#define FT_BITMODE_MCU_HOST 0x08 |
228 |
// |
229 |
#define FT_BITMODE_FAST_SERIAL 0x10 |
229 |
|
230 |
#define FT_BITMODE_CBUS_BITBANG 0x20 |
230 |
#define FT_BITMODE_RESET 0x00 |
231 |
#define FT_BITMODE_SYNC_FIFO 0x40 |
231 |
#define FT_BITMODE_ASYNC_BITBANG 0x01 |
232 |
|
232 |
#define FT_BITMODE_MPSSE 0x02 |
233 |
|
233 |
#define FT_BITMODE_SYNC_BITBANG 0x04 |
234 |
// |
234 |
#define FT_BITMODE_MCU_HOST 0x08 |
235 |
// FT232R CBUS Options EEPROM values |
235 |
#define FT_BITMODE_FAST_SERIAL 0x10 |
236 |
// |
236 |
#define FT_BITMODE_CBUS_BITBANG 0x20 |
237 |
|
237 |
#define FT_BITMODE_SYNC_FIFO 0x40 |
238 |
#define FT_232R_CBUS_TXDEN 0x00 // Tx Data Enable |
238 |
|
239 |
#define FT_232R_CBUS_PWRON 0x01 // Power On |
239 |
// |
240 |
#define FT_232R_CBUS_RXLED 0x02 // Rx LED |
240 |
// FT232R CBUS Options EEPROM values |
241 |
#define FT_232R_CBUS_TXLED 0x03 // Tx LED |
241 |
// |
242 |
#define FT_232R_CBUS_TXRXLED 0x04 // Tx and Rx LED |
242 |
|
243 |
#define FT_232R_CBUS_SLEEP 0x05 // Sleep |
243 |
#define FT_232R_CBUS_TXDEN 0x00 // Tx Data Enable |
244 |
#define FT_232R_CBUS_CLK48 0x06 // 48MHz clock |
244 |
#define FT_232R_CBUS_PWRON 0x01 // Power On |
245 |
#define FT_232R_CBUS_CLK24 0x07 // 24MHz clock |
245 |
#define FT_232R_CBUS_RXLED 0x02 // Rx LED |
246 |
#define FT_232R_CBUS_CLK12 0x08 // 12MHz clock |
246 |
#define FT_232R_CBUS_TXLED 0x03 // Tx LED |
247 |
#define FT_232R_CBUS_CLK6 0x09 // 6MHz clock |
247 |
#define FT_232R_CBUS_TXRXLED 0x04 // Tx and Rx LED |
248 |
#define FT_232R_CBUS_IOMODE 0x0A // IO Mode for CBUS bit-bang |
248 |
#define FT_232R_CBUS_SLEEP 0x05 // Sleep |
249 |
#define FT_232R_CBUS_BITBANG_WR 0x0B // Bit-bang write strobe |
249 |
#define FT_232R_CBUS_CLK48 0x06 // 48MHz clock |
250 |
#define FT_232R_CBUS_BITBANG_RD 0x0C // Bit-bang read strobe |
250 |
#define FT_232R_CBUS_CLK24 0x07 // 24MHz clock |
251 |
|
251 |
#define FT_232R_CBUS_CLK12 0x08 // 12MHz clock |
252 |
// |
252 |
#define FT_232R_CBUS_CLK6 0x09 // 6MHz clock |
253 |
// FT232H CBUS Options EEPROM values |
253 |
#define FT_232R_CBUS_IOMODE 0x0A // IO Mode for CBUS bit-bang |
254 |
// |
254 |
#define FT_232R_CBUS_BITBANG_WR 0x0B // Bit-bang write strobe |
255 |
|
255 |
#define FT_232R_CBUS_BITBANG_RD 0x0C // Bit-bang read strobe |
256 |
#define FT_232H_CBUS_TRISTATE 0x00 // Tristate |
256 |
|
257 |
#define FT_232H_CBUS_TXLED 0x01 // Tx LED |
257 |
// |
258 |
#define FT_232H_CBUS_RXLED 0x02 // Rx LED |
258 |
// FT232H CBUS Options EEPROM values |
259 |
#define FT_232H_CBUS_TXRXLED 0x03 // Tx and Rx LED |
259 |
// |
260 |
#define FT_232H_CBUS_PWREN 0x04 // Power Enable |
260 |
|
261 |
#define FT_232H_CBUS_SLEEP 0x05 // Sleep |
261 |
#define FT_232H_CBUS_TRISTATE 0x00 // Tristate |
262 |
#define FT_232H_CBUS_DRIVE_0 0x06 // Drive pin to logic 0 |
262 |
#define FT_232H_CBUS_TXLED 0x01 // Tx LED |
263 |
#define FT_232H_CBUS_DRIVE_1 0x07 // Drive pin to logic 1 |
263 |
#define FT_232H_CBUS_RXLED 0x02 // Rx LED |
264 |
#define FT_232H_CBUS_IOMODE 0x08 // IO Mode for CBUS bit-bang |
264 |
#define FT_232H_CBUS_TXRXLED 0x03 // Tx and Rx LED |
265 |
#define FT_232H_CBUS_TXDEN 0x09 // Tx Data Enable |
265 |
#define FT_232H_CBUS_PWREN 0x04 // Power Enable |
266 |
#define FT_232H_CBUS_CLK30 0x0A // 30MHz clock |
266 |
#define FT_232H_CBUS_SLEEP 0x05 // Sleep |
267 |
#define FT_232H_CBUS_CLK15 0x0B // 15MHz clock |
267 |
#define FT_232H_CBUS_DRIVE_0 0x06 // Drive pin to logic 0 |
268 |
#define FT_232H_CBUS_CLK7_5 0x0C // 7.5MHz clock |
268 |
#define FT_232H_CBUS_DRIVE_1 0x07 // Drive pin to logic 1 |
269 |
|
269 |
#define FT_232H_CBUS_IOMODE 0x08 // IO Mode for CBUS bit-bang |
270 |
|
270 |
#define FT_232H_CBUS_TXDEN 0x09 // Tx Data Enable |
271 |
#ifdef __cplusplus |
271 |
#define FT_232H_CBUS_CLK30 0x0A // 30MHz clock |
272 |
extern "C" { |
272 |
#define FT_232H_CBUS_CLK15 0x0B // 15MHz clock |
273 |
#endif |
273 |
#define FT_232H_CBUS_CLK7_5 0x0C // 7.5MHz clock |
274 |
|
274 |
|
275 |
FTD2XX_API |
275 |
// |
276 |
FT_STATUS WINAPI FT_Open( |
276 |
// FT X Series CBUS Options EEPROM values |
277 |
int deviceNumber, |
277 |
// |
278 |
FT_HANDLE *pHandle |
278 |
|
279 |
); |
279 |
#define FT_X_SERIES_CBUS_TRISTATE 0x00 // Tristate |
280 |
|
280 |
#define FT_X_SERIES_CBUS_TXLED 0x01 // Tx LED |
281 |
FTD2XX_API |
281 |
#define FT_X_SERIES_CBUS_RXLED 0x02 // Rx LED |
282 |
FT_STATUS WINAPI FT_OpenEx( |
282 |
#define FT_X_SERIES_CBUS_TXRXLED 0x03 // Tx and Rx LED |
283 |
PVOID pArg1, |
283 |
#define FT_X_SERIES_CBUS_PWREN 0x04 // Power Enable |
284 |
DWORD Flags, |
284 |
#define FT_X_SERIES_CBUS_SLEEP 0x05 // Sleep |
285 |
FT_HANDLE *pHandle |
285 |
#define FT_X_SERIES_CBUS_DRIVE_0 0x06 // Drive pin to logic 0 |
286 |
); |
286 |
#define FT_X_SERIES_CBUS_DRIVE_1 0x07 // Drive pin to logic 1 |
287 |
|
287 |
#define FT_X_SERIES_CBUS_IOMODE 0x08 // IO Mode for CBUS bit-bang |
288 |
FTD2XX_API |
288 |
#define FT_X_SERIES_CBUS_TXDEN 0x09 // Tx Data Enable |
289 |
FT_STATUS WINAPI FT_ListDevices( |
289 |
#define FT_X_SERIES_CBUS_CLK24 0x0A // 24MHz clock |
290 |
PVOID pArg1, |
290 |
#define FT_X_SERIES_CBUS_CLK12 0x0B // 12MHz clock |
291 |
PVOID pArg2, |
291 |
#define FT_X_SERIES_CBUS_CLK6 0x0C // 6MHz clock |
292 |
DWORD Flags |
292 |
#define FT_X_SERIES_CBUS_BCD_CHARGER 0x0D // Battery charger detected |
293 |
); |
293 |
#define FT_X_SERIES_CBUS_BCD_CHARGER_N 0x0E // Battery charger detected inverted |
294 |
|
294 |
#define FT_X_SERIES_CBUS_I2C_TXE 0x0F // I2C Tx empty |
295 |
FTD2XX_API |
295 |
#define FT_X_SERIES_CBUS_I2C_RXF 0x10 // I2C Rx full |
296 |
FT_STATUS FT_SetVIDPID( |
296 |
#define FT_X_SERIES_CBUS_VBUS_SENSE 0x11 // Detect VBUS |
297 |
DWORD dwVID, |
297 |
#define FT_X_SERIES_CBUS_BITBANG_WR 0x12 // Bit-bang write strobe |
298 |
DWORD dwPID |
298 |
#define FT_X_SERIES_CBUS_BITBANG_RD 0x13 // Bit-bang read strobe |
299 |
); |
299 |
#define FT_X_SERIES_CBUS_TIMESTAMP 0x14 // Toggle output when a USB SOF token is received |
300 |
|
300 |
#define FT_X_SERIES_CBUS_KEEP_AWAKE 0x15 // |
301 |
FTD2XX_API |
301 |
|
302 |
FT_STATUS FT_GetVIDPID( |
302 |
|
303 |
DWORD * pdwVID, |
303 |
// Driver types |
304 |
DWORD * pdwPID |
304 |
#define FT_DRIVER_TYPE_D2XX 0 |
305 |
); |
305 |
#define FT_DRIVER_TYPE_VCP 1 |
306 |
|
306 |
|
307 |
FTD2XX_API |
307 |
|
308 |
FT_STATUS WINAPI FT_Close( |
308 |
|
309 |
FT_HANDLE ftHandle |
309 |
#ifdef __cplusplus |
310 |
); |
310 |
extern "C" { |
311 |
|
311 |
#endif |
312 |
FTD2XX_API |
312 |
|
313 |
FT_STATUS WINAPI FT_Read( |
313 |
|
314 |
FT_HANDLE ftHandle, |
314 |
FTD2XX_API |
315 |
LPVOID lpBuffer, |
315 |
FT_STATUS WINAPI FT_Open( |
316 |
DWORD nBufferSize, |
316 |
int deviceNumber, |
317 |
LPDWORD lpBytesReturned |
317 |
FT_HANDLE *pHandle |
318 |
); |
318 |
); |
319 |
|
319 |
|
320 |
FTD2XX_API |
320 |
FTD2XX_API |
321 |
FT_STATUS WINAPI FT_Write( |
321 |
FT_STATUS WINAPI FT_OpenEx( |
322 |
FT_HANDLE ftHandle, |
322 |
PVOID pArg1, |
323 |
LPVOID lpBuffer, |
323 |
DWORD Flags, |
324 |
DWORD nBufferSize, |
324 |
FT_HANDLE *pHandle |
325 |
LPDWORD lpBytesWritten |
325 |
); |
326 |
); |
326 |
|
327 |
|
327 |
FTD2XX_API |
328 |
FTD2XX_API |
328 |
FT_STATUS WINAPI FT_ListDevices( |
329 |
FT_STATUS WINAPI FT_IoCtl( |
329 |
PVOID pArg1, |
330 |
FT_HANDLE ftHandle, |
330 |
PVOID pArg2, |
331 |
DWORD dwIoControlCode, |
331 |
DWORD Flags |
332 |
LPVOID lpInBuf, |
332 |
); |
333 |
DWORD nInBufSize, |
333 |
|
334 |
LPVOID lpOutBuf, |
334 |
FTD2XX_API |
335 |
DWORD nOutBufSize, |
335 |
FT_STATUS WINAPI FT_Close( |
336 |
LPDWORD lpBytesReturned, |
336 |
FT_HANDLE ftHandle |
337 |
LPOVERLAPPED lpOverlapped |
337 |
); |
338 |
); |
338 |
|
339 |
|
339 |
FTD2XX_API |
340 |
FTD2XX_API |
340 |
FT_STATUS WINAPI FT_Read( |
341 |
FT_STATUS WINAPI FT_SetBaudRate( |
341 |
FT_HANDLE ftHandle, |
342 |
FT_HANDLE ftHandle, |
342 |
LPVOID lpBuffer, |
343 |
ULONG BaudRate |
343 |
DWORD dwBytesToRead, |
344 |
); |
344 |
LPDWORD lpBytesReturned |
345 |
|
345 |
); |
346 |
FTD2XX_API |
346 |
|
347 |
FT_STATUS WINAPI FT_SetDivisor( |
347 |
FTD2XX_API |
348 |
FT_HANDLE ftHandle, |
348 |
FT_STATUS WINAPI FT_Write( |
349 |
USHORT Divisor |
349 |
FT_HANDLE ftHandle, |
350 |
); |
350 |
LPVOID lpBuffer, |
351 |
|
351 |
DWORD dwBytesToWrite, |
352 |
FTD2XX_API |
352 |
LPDWORD lpBytesWritten |
353 |
FT_STATUS WINAPI FT_SetDataCharacteristics( |
353 |
); |
354 |
FT_HANDLE ftHandle, |
354 |
|
355 |
UCHAR WordLength, |
355 |
FTD2XX_API |
356 |
UCHAR StopBits, |
356 |
FT_STATUS WINAPI FT_IoCtl( |
357 |
UCHAR Parity |
357 |
FT_HANDLE ftHandle, |
358 |
); |
358 |
DWORD dwIoControlCode, |
359 |
|
359 |
LPVOID lpInBuf, |
360 |
FTD2XX_API |
360 |
DWORD nInBufSize, |
361 |
FT_STATUS WINAPI FT_SetFlowControl( |
361 |
LPVOID lpOutBuf, |
362 |
FT_HANDLE ftHandle, |
362 |
DWORD nOutBufSize, |
363 |
USHORT FlowControl, |
363 |
LPDWORD lpBytesReturned, |
364 |
UCHAR XonChar, |
364 |
LPOVERLAPPED lpOverlapped |
365 |
UCHAR XoffChar |
365 |
); |
366 |
); |
366 |
|
367 |
|
367 |
FTD2XX_API |
368 |
FTD2XX_API |
368 |
FT_STATUS WINAPI FT_SetBaudRate( |
369 |
FT_STATUS WINAPI FT_ResetDevice( |
369 |
FT_HANDLE ftHandle, |
370 |
FT_HANDLE ftHandle |
370 |
ULONG BaudRate |
371 |
); |
371 |
); |
372 |
|
372 |
|
373 |
FTD2XX_API |
373 |
FTD2XX_API |
374 |
FT_STATUS WINAPI FT_SetDtr( |
374 |
FT_STATUS WINAPI FT_SetDivisor( |
375 |
FT_HANDLE ftHandle |
375 |
FT_HANDLE ftHandle, |
376 |
); |
376 |
USHORT Divisor |
377 |
|
377 |
); |
378 |
FTD2XX_API |
378 |
|
379 |
FT_STATUS WINAPI FT_ClrDtr( |
379 |
FTD2XX_API |
380 |
FT_HANDLE ftHandle |
380 |
FT_STATUS WINAPI FT_SetDataCharacteristics( |
381 |
); |
381 |
FT_HANDLE ftHandle, |
382 |
|
382 |
UCHAR WordLength, |
383 |
FTD2XX_API |
383 |
UCHAR StopBits, |
384 |
FT_STATUS WINAPI FT_SetRts( |
384 |
UCHAR Parity |
385 |
FT_HANDLE ftHandle |
385 |
); |
386 |
); |
386 |
|
387 |
|
387 |
FTD2XX_API |
388 |
FTD2XX_API |
388 |
FT_STATUS WINAPI FT_SetFlowControl( |
389 |
FT_STATUS WINAPI FT_ClrRts( |
389 |
FT_HANDLE ftHandle, |
390 |
FT_HANDLE ftHandle |
390 |
USHORT FlowControl, |
391 |
); |
391 |
UCHAR XonChar, |
392 |
|
392 |
UCHAR XoffChar |
393 |
FTD2XX_API |
393 |
); |
394 |
FT_STATUS WINAPI FT_GetModemStatus( |
394 |
|
395 |
FT_HANDLE ftHandle, |
395 |
FTD2XX_API |
396 |
ULONG *pModemStatus |
396 |
FT_STATUS WINAPI FT_ResetDevice( |
397 |
); |
397 |
FT_HANDLE ftHandle |
398 |
|
398 |
); |
399 |
FTD2XX_API |
399 |
|
400 |
FT_STATUS WINAPI FT_SetChars( |
400 |
FTD2XX_API |
401 |
FT_HANDLE ftHandle, |
401 |
FT_STATUS WINAPI FT_SetDtr( |
402 |
UCHAR EventChar, |
402 |
FT_HANDLE ftHandle |
403 |
UCHAR EventCharEnabled, |
403 |
); |
404 |
UCHAR ErrorChar, |
404 |
|
405 |
UCHAR ErrorCharEnabled |
405 |
FTD2XX_API |
406 |
); |
406 |
FT_STATUS WINAPI FT_ClrDtr( |
407 |
|
407 |
FT_HANDLE ftHandle |
408 |
FTD2XX_API |
408 |
); |
409 |
FT_STATUS WINAPI FT_Purge( |
409 |
|
410 |
FT_HANDLE ftHandle, |
410 |
FTD2XX_API |
411 |
ULONG Mask |
411 |
FT_STATUS WINAPI FT_SetRts( |
412 |
); |
412 |
FT_HANDLE ftHandle |
413 |
|
413 |
); |
414 |
FTD2XX_API |
414 |
|
415 |
FT_STATUS WINAPI FT_SetTimeouts( |
415 |
FTD2XX_API |
416 |
FT_HANDLE ftHandle, |
416 |
FT_STATUS WINAPI FT_ClrRts( |
417 |
ULONG ReadTimeout, |
417 |
FT_HANDLE ftHandle |
418 |
ULONG WriteTimeout |
418 |
); |
419 |
); |
419 |
|
420 |
|
420 |
FTD2XX_API |
421 |
FTD2XX_API |
421 |
FT_STATUS WINAPI FT_GetModemStatus( |
422 |
FT_STATUS WINAPI FT_GetQueueStatus( |
422 |
FT_HANDLE ftHandle, |
423 |
FT_HANDLE ftHandle, |
423 |
ULONG *pModemStatus |
424 |
DWORD *dwRxBytes |
424 |
); |
425 |
); |
425 |
|
426 |
|
426 |
FTD2XX_API |
427 |
FTD2XX_API |
427 |
FT_STATUS WINAPI FT_SetChars( |
428 |
FT_STATUS WINAPI FT_GetQueueStatusEx( |
428 |
FT_HANDLE ftHandle, |
429 |
FT_HANDLE ftHandle, |
429 |
UCHAR EventChar, |
430 |
DWORD *dwRxBytes |
430 |
UCHAR EventCharEnabled, |
431 |
); |
431 |
UCHAR ErrorChar, |
432 |
|
432 |
UCHAR ErrorCharEnabled |
433 |
FTD2XX_API |
433 |
); |
434 |
FT_STATUS WINAPI FT_SetEventNotification( |
434 |
|
435 |
FT_HANDLE ftHandle, |
435 |
FTD2XX_API |
436 |
DWORD Mask, |
436 |
FT_STATUS WINAPI FT_Purge( |
437 |
PVOID Param |
437 |
FT_HANDLE ftHandle, |
438 |
); |
438 |
ULONG Mask |
439 |
|
439 |
); |
440 |
FTD2XX_API |
440 |
|
441 |
FT_STATUS WINAPI FT_GetStatus( |
441 |
FTD2XX_API |
442 |
FT_HANDLE ftHandle, |
442 |
FT_STATUS WINAPI FT_SetTimeouts( |
443 |
DWORD *dwRxBytes, |
443 |
FT_HANDLE ftHandle, |
444 |
DWORD *dwTxBytes, |
444 |
ULONG ReadTimeout, |
445 |
DWORD *dwEventDWord |
445 |
ULONG WriteTimeout |
446 |
); |
446 |
); |
447 |
|
447 |
|
448 |
FTD2XX_API |
448 |
FTD2XX_API |
449 |
FT_STATUS WINAPI FT_SetBreakOn( |
449 |
FT_STATUS WINAPI FT_GetQueueStatus( |
450 |
FT_HANDLE ftHandle |
450 |
FT_HANDLE ftHandle, |
451 |
); |
451 |
DWORD *dwRxBytes |
452 |
|
452 |
); |
453 |
FTD2XX_API |
453 |
|
454 |
FT_STATUS WINAPI FT_SetBreakOff( |
454 |
FTD2XX_API |
455 |
FT_HANDLE ftHandle |
455 |
FT_STATUS WINAPI FT_SetEventNotification( |
456 |
); |
456 |
FT_HANDLE ftHandle, |
457 |
|
457 |
DWORD Mask, |
458 |
FTD2XX_API |
458 |
PVOID Param |
459 |
FT_STATUS WINAPI FT_SetWaitMask( |
459 |
); |
460 |
FT_HANDLE ftHandle, |
460 |
|
461 |
DWORD Mask |
461 |
FTD2XX_API |
462 |
); |
462 |
FT_STATUS WINAPI FT_GetStatus( |
463 |
|
463 |
FT_HANDLE ftHandle, |
464 |
FTD2XX_API |
464 |
DWORD *dwRxBytes, |
465 |
FT_STATUS WINAPI FT_WaitOnMask( |
465 |
DWORD *dwTxBytes, |
466 |
FT_HANDLE ftHandle, |
466 |
DWORD *dwEventDWord |
467 |
DWORD *Mask |
467 |
); |
468 |
); |
468 |
|
469 |
|
469 |
FTD2XX_API |
470 |
FTD2XX_API |
470 |
FT_STATUS WINAPI FT_SetBreakOn( |
471 |
FT_STATUS WINAPI FT_GetEventStatus( |
471 |
FT_HANDLE ftHandle |
472 |
FT_HANDLE ftHandle, |
472 |
); |
473 |
DWORD *dwEventDWord |
473 |
|
474 |
); |
474 |
FTD2XX_API |
475 |
|
475 |
FT_STATUS WINAPI FT_SetBreakOff( |
476 |
FTD2XX_API |
476 |
FT_HANDLE ftHandle |
477 |
FT_STATUS WINAPI FT_ReadEE( |
477 |
); |
478 |
FT_HANDLE ftHandle, |
478 |
|
479 |
DWORD dwWordOffset, |
479 |
FTD2XX_API |
480 |
LPWORD lpwValue |
480 |
FT_STATUS WINAPI FT_SetWaitMask( |
481 |
); |
481 |
FT_HANDLE ftHandle, |
482 |
|
482 |
DWORD Mask |
483 |
FTD2XX_API |
483 |
); |
484 |
FT_STATUS WINAPI FT_WriteEE( |
484 |
|
485 |
FT_HANDLE ftHandle, |
485 |
FTD2XX_API |
486 |
DWORD dwWordOffset, |
486 |
FT_STATUS WINAPI FT_WaitOnMask( |
487 |
WORD wValue |
487 |
FT_HANDLE ftHandle, |
488 |
); |
488 |
DWORD *Mask |
489 |
|
489 |
); |
490 |
FTD2XX_API |
490 |
|
491 |
FT_STATUS WINAPI FT_EraseEE( |
491 |
FTD2XX_API |
492 |
FT_HANDLE ftHandle |
492 |
FT_STATUS WINAPI FT_GetEventStatus( |
493 |
); |
493 |
FT_HANDLE ftHandle, |
494 |
|
494 |
DWORD *dwEventDWord |
495 |
// |
495 |
); |
496 |
// structure to hold program data for FT_Program function |
496 |
|
497 |
// |
497 |
FTD2XX_API |
498 |
typedef struct ft_program_data { |
498 |
FT_STATUS WINAPI FT_ReadEE( |
499 |
|
499 |
FT_HANDLE ftHandle, |
500 |
DWORD Signature1; // Header - must be 0x00000000 |
500 |
DWORD dwWordOffset, |
501 |
DWORD Signature2; // Header - must be 0xffffffff |
501 |
LPWORD lpwValue |
502 |
DWORD Version; // Header - FT_PROGRAM_DATA version |
502 |
); |
503 |
// 0 = original |
503 |
|
504 |
// 1 = FT2232C extensions |
504 |
FTD2XX_API |
505 |
// 2 = FT232R extensions |
505 |
FT_STATUS WINAPI FT_WriteEE( |
506 |
// 3 = FT2232H extensions |
506 |
FT_HANDLE ftHandle, |
507 |
// 4 = FT4232H extensions |
507 |
DWORD dwWordOffset, |
508 |
// 5 = FT232H extensions |
508 |
WORD wValue |
509 |
WORD VendorId; // 0x0403 |
509 |
); |
510 |
WORD ProductId; // 0x6001 |
510 |
|
511 |
char *Manufacturer; // "FTDI" |
511 |
FTD2XX_API |
512 |
char *ManufacturerId; // "FT" |
512 |
FT_STATUS WINAPI FT_EraseEE( |
513 |
char *Description; // "USB HS Serial Converter" |
513 |
FT_HANDLE ftHandle |
514 |
char *SerialNumber; // "FT000001" if fixed, or NULL |
514 |
); |
515 |
WORD MaxPower; // 0 < MaxPower <= 500 |
515 |
|
516 |
WORD PnP; // 0 = disabled, 1 = enabled |
516 |
// |
517 |
WORD SelfPowered; // 0 = bus powered, 1 = self powered |
517 |
// structure to hold program data for FT_EE_Program, FT_EE_ProgramEx, FT_EE_Read |
518 |
WORD RemoteWakeup; // 0 = not capable, 1 = capable |
518 |
// and FT_EE_ReadEx functions |
519 |
// |
519 |
// |
520 |
// Rev4 (FT232B) extensions |
520 |
typedef struct ft_program_data { |
521 |
// |
521 |
|
522 |
UCHAR Rev4; // non-zero if Rev4 chip, zero otherwise |
522 |
DWORD Signature1; // Header - must be 0x00000000 |
523 |
UCHAR IsoIn; // non-zero if in endpoint is isochronous |
523 |
DWORD Signature2; // Header - must be 0xffffffff |
524 |
UCHAR IsoOut; // non-zero if out endpoint is isochronous |
524 |
DWORD Version; // Header - FT_PROGRAM_DATA version |
525 |
UCHAR PullDownEnable; // non-zero if pull down enabled |
525 |
// 0 = original |
526 |
UCHAR SerNumEnable; // non-zero if serial number to be used |
526 |
// 1 = FT2232 extensions |
527 |
UCHAR USBVersionEnable; // non-zero if chip uses USBVersion |
527 |
// 2 = FT232R extensions |
528 |
WORD USBVersion; // BCD (0x0200 => USB2) |
528 |
// 3 = FT2232H extensions |
529 |
// |
529 |
// 4 = FT4232H extensions |
530 |
// Rev 5 (FT2232) extensions |
530 |
// 5 = FT232H extensions |
531 |
// |
531 |
|
532 |
UCHAR Rev5; // non-zero if Rev5 chip, zero otherwise |
532 |
WORD VendorId; // 0x0403 |
533 |
UCHAR IsoInA; // non-zero if in endpoint is isochronous |
533 |
WORD ProductId; // 0x6001 |
534 |
UCHAR IsoInB; // non-zero if in endpoint is isochronous |
534 |
char *Manufacturer; // "FTDI" |
535 |
UCHAR IsoOutA; // non-zero if out endpoint is isochronous |
535 |
char *ManufacturerId; // "FT" |
536 |
UCHAR IsoOutB; // non-zero if out endpoint is isochronous |
536 |
char *Description; // "USB HS Serial Converter" |
537 |
UCHAR PullDownEnable5; // non-zero if pull down enabled |
537 |
char *SerialNumber; // "FT000001" if fixed, or NULL |
538 |
UCHAR SerNumEnable5; // non-zero if serial number to be used |
538 |
WORD MaxPower; // 0 < MaxPower <= 500 |
539 |
UCHAR USBVersionEnable5; // non-zero if chip uses USBVersion |
539 |
WORD PnP; // 0 = disabled, 1 = enabled |
540 |
WORD USBVersion5; // BCD (0x0200 => USB2) |
540 |
WORD SelfPowered; // 0 = bus powered, 1 = self powered |
541 |
UCHAR AIsHighCurrent; // non-zero if interface is high current |
541 |
WORD RemoteWakeup; // 0 = not capable, 1 = capable |
542 |
UCHAR BIsHighCurrent; // non-zero if interface is high current |
542 |
// |
543 |
UCHAR IFAIsFifo; // non-zero if interface is 245 FIFO |
543 |
// Rev4 (FT232B) extensions |
544 |
UCHAR IFAIsFifoTar; // non-zero if interface is 245 FIFO CPU target |
544 |
// |
545 |
UCHAR IFAIsFastSer; // non-zero if interface is Fast serial |
545 |
UCHAR Rev4; // non-zero if Rev4 chip, zero otherwise |
546 |
UCHAR AIsVCP; // non-zero if interface is to use VCP drivers |
546 |
UCHAR IsoIn; // non-zero if in endpoint is isochronous |
547 |
UCHAR IFBIsFifo; // non-zero if interface is 245 FIFO |
547 |
UCHAR IsoOut; // non-zero if out endpoint is isochronous |
548 |
UCHAR IFBIsFifoTar; // non-zero if interface is 245 FIFO CPU target |
548 |
UCHAR PullDownEnable; // non-zero if pull down enabled |
549 |
UCHAR IFBIsFastSer; // non-zero if interface is Fast serial |
549 |
UCHAR SerNumEnable; // non-zero if serial number to be used |
550 |
UCHAR BIsVCP; // non-zero if interface is to use VCP drivers |
550 |
UCHAR USBVersionEnable; // non-zero if chip uses USBVersion |
551 |
// |
551 |
WORD USBVersion; // BCD (0x0200 => USB2) |
552 |
// Rev 6 (FT232R) extensions |
552 |
// |
553 |
// |
553 |
// Rev 5 (FT2232) extensions |
554 |
UCHAR UseExtOsc; // Use External Oscillator |
554 |
// |
555 |
UCHAR HighDriveIOs; // High Drive I/Os |
555 |
UCHAR Rev5; // non-zero if Rev5 chip, zero otherwise |
556 |
UCHAR EndpointSize; // Endpoint size |
556 |
UCHAR IsoInA; // non-zero if in endpoint is isochronous |
557 |
UCHAR PullDownEnableR; // non-zero if pull down enabled |
557 |
UCHAR IsoInB; // non-zero if in endpoint is isochronous |
558 |
UCHAR SerNumEnableR; // non-zero if serial number to be used |
558 |
UCHAR IsoOutA; // non-zero if out endpoint is isochronous |
559 |
UCHAR InvertTXD; // non-zero if invert TXD |
559 |
UCHAR IsoOutB; // non-zero if out endpoint is isochronous |
560 |
UCHAR InvertRXD; // non-zero if invert RXD |
560 |
UCHAR PullDownEnable5; // non-zero if pull down enabled |
561 |
UCHAR InvertRTS; // non-zero if invert RTS |
561 |
UCHAR SerNumEnable5; // non-zero if serial number to be used |
562 |
UCHAR InvertCTS; // non-zero if invert CTS |
562 |
UCHAR USBVersionEnable5; // non-zero if chip uses USBVersion |
563 |
UCHAR InvertDTR; // non-zero if invert DTR |
563 |
WORD USBVersion5; // BCD (0x0200 => USB2) |
564 |
UCHAR InvertDSR; // non-zero if invert DSR |
564 |
UCHAR AIsHighCurrent; // non-zero if interface is high current |
565 |
UCHAR InvertDCD; // non-zero if invert DCD |
565 |
UCHAR BIsHighCurrent; // non-zero if interface is high current |
566 |
UCHAR InvertRI; // non-zero if invert RI |
566 |
UCHAR IFAIsFifo; // non-zero if interface is 245 FIFO |
567 |
UCHAR Cbus0; // Cbus Mux control |
567 |
UCHAR IFAIsFifoTar; // non-zero if interface is 245 FIFO CPU target |
568 |
UCHAR Cbus1; // Cbus Mux control |
568 |
UCHAR IFAIsFastSer; // non-zero if interface is Fast serial |
569 |
UCHAR Cbus2; // Cbus Mux control |
569 |
UCHAR AIsVCP; // non-zero if interface is to use VCP drivers |
570 |
UCHAR Cbus3; // Cbus Mux control |
570 |
UCHAR IFBIsFifo; // non-zero if interface is 245 FIFO |
571 |
UCHAR Cbus4; // Cbus Mux control |
571 |
UCHAR IFBIsFifoTar; // non-zero if interface is 245 FIFO CPU target |
572 |
UCHAR RIsD2XX; // non-zero if using D2XX drivers |
572 |
UCHAR IFBIsFastSer; // non-zero if interface is Fast serial |
573 |
// |
573 |
UCHAR BIsVCP; // non-zero if interface is to use VCP drivers |
574 |
// Rev 7 (FT2232H) Extensions |
574 |
// |
575 |
// |
575 |
// Rev 6 (FT232R) extensions |
576 |
UCHAR PullDownEnable7; // non-zero if pull down enabled |
576 |
// |
577 |
UCHAR SerNumEnable7; // non-zero if serial number to be used |
577 |
UCHAR UseExtOsc; // Use External Oscillator |
578 |
UCHAR ALSlowSlew; // non-zero if AL pins have slow slew |
578 |
UCHAR HighDriveIOs; // High Drive I/Os |
579 |
UCHAR ALSchmittInput; // non-zero if AL pins are Schmitt input |
579 |
UCHAR EndpointSize; // Endpoint size |
580 |
UCHAR ALDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
580 |
UCHAR PullDownEnableR; // non-zero if pull down enabled |
581 |
UCHAR AHSlowSlew; // non-zero if AH pins have slow slew |
581 |
UCHAR SerNumEnableR; // non-zero if serial number to be used |
582 |
UCHAR AHSchmittInput; // non-zero if AH pins are Schmitt input |
582 |
UCHAR InvertTXD; // non-zero if invert TXD |
583 |
UCHAR AHDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
583 |
UCHAR InvertRXD; // non-zero if invert RXD |
584 |
UCHAR BLSlowSlew; // non-zero if BL pins have slow slew |
584 |
UCHAR InvertRTS; // non-zero if invert RTS |
585 |
UCHAR BLSchmittInput; // non-zero if BL pins are Schmitt input |
585 |
UCHAR InvertCTS; // non-zero if invert CTS |
586 |
UCHAR BLDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
586 |
UCHAR InvertDTR; // non-zero if invert DTR |
587 |
UCHAR BHSlowSlew; // non-zero if BH pins have slow slew |
587 |
UCHAR InvertDSR; // non-zero if invert DSR |
588 |
UCHAR BHSchmittInput; // non-zero if BH pins are Schmitt input |
588 |
UCHAR InvertDCD; // non-zero if invert DCD |
589 |
UCHAR BHDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
589 |
UCHAR InvertRI; // non-zero if invert RI |
590 |
UCHAR IFAIsFifo7; // non-zero if interface is 245 FIFO |
590 |
UCHAR Cbus0; // Cbus Mux control |
591 |
UCHAR IFAIsFifoTar7; // non-zero if interface is 245 FIFO CPU target |
591 |
UCHAR Cbus1; // Cbus Mux control |
592 |
UCHAR IFAIsFastSer7; // non-zero if interface is Fast serial |
592 |
UCHAR Cbus2; // Cbus Mux control |
593 |
UCHAR AIsVCP7; // non-zero if interface is to use VCP drivers |
593 |
UCHAR Cbus3; // Cbus Mux control |
594 |
UCHAR IFBIsFifo7; // non-zero if interface is 245 FIFO |
594 |
UCHAR Cbus4; // Cbus Mux control |
595 |
UCHAR IFBIsFifoTar7; // non-zero if interface is 245 FIFO CPU target |
595 |
UCHAR RIsD2XX; // non-zero if using D2XX driver |
596 |
UCHAR IFBIsFastSer7; // non-zero if interface is Fast serial |
596 |
// |
597 |
UCHAR BIsVCP7; // non-zero if interface is to use VCP drivers |
597 |
// Rev 7 (FT2232H) Extensions |
598 |
UCHAR PowerSaveEnable; // non-zero if using BCBUS7 to save power for self-powered designs |
598 |
// |
599 |
// |
599 |
UCHAR PullDownEnable7; // non-zero if pull down enabled |
600 |
// Rev 8 (FT4232H) Extensions |
600 |
UCHAR SerNumEnable7; // non-zero if serial number to be used |
601 |
// |
601 |
UCHAR ALSlowSlew; // non-zero if AL pins have slow slew |
602 |
UCHAR PullDownEnable8; // non-zero if pull down enabled |
602 |
UCHAR ALSchmittInput; // non-zero if AL pins are Schmitt input |
603 |
UCHAR SerNumEnable8; // non-zero if serial number to be used |
603 |
UCHAR ALDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
604 |
UCHAR ASlowSlew; // non-zero if AL pins have slow slew |
604 |
UCHAR AHSlowSlew; // non-zero if AH pins have slow slew |
605 |
UCHAR ASchmittInput; // non-zero if AL pins are Schmitt input |
605 |
UCHAR AHSchmittInput; // non-zero if AH pins are Schmitt input |
606 |
UCHAR ADriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
606 |
UCHAR AHDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
607 |
UCHAR BSlowSlew; // non-zero if AH pins have slow slew |
607 |
UCHAR BLSlowSlew; // non-zero if BL pins have slow slew |
608 |
UCHAR BSchmittInput; // non-zero if AH pins are Schmitt input |
608 |
UCHAR BLSchmittInput; // non-zero if BL pins are Schmitt input |
609 |
UCHAR BDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
609 |
UCHAR BLDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
610 |
UCHAR CSlowSlew; // non-zero if BL pins have slow slew |
610 |
UCHAR BHSlowSlew; // non-zero if BH pins have slow slew |
611 |
UCHAR CSchmittInput; // non-zero if BL pins are Schmitt input |
611 |
UCHAR BHSchmittInput; // non-zero if BH pins are Schmitt input |
612 |
UCHAR CDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
612 |
UCHAR BHDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
613 |
UCHAR DSlowSlew; // non-zero if BH pins have slow slew |
613 |
UCHAR IFAIsFifo7; // non-zero if interface is 245 FIFO |
614 |
UCHAR DSchmittInput; // non-zero if BH pins are Schmitt input |
614 |
UCHAR IFAIsFifoTar7; // non-zero if interface is 245 FIFO CPU target |
615 |
UCHAR DDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
615 |
UCHAR IFAIsFastSer7; // non-zero if interface is Fast serial |
616 |
UCHAR ARIIsTXDEN; // non-zero if port A uses RI as RS485 TXDEN |
616 |
UCHAR AIsVCP7; // non-zero if interface is to use VCP drivers |
617 |
UCHAR BRIIsTXDEN; // non-zero if port B uses RI as RS485 TXDEN |
617 |
UCHAR IFBIsFifo7; // non-zero if interface is 245 FIFO |
618 |
UCHAR CRIIsTXDEN; // non-zero if port C uses RI as RS485 TXDEN |
618 |
UCHAR IFBIsFifoTar7; // non-zero if interface is 245 FIFO CPU target |
619 |
UCHAR DRIIsTXDEN; // non-zero if port D uses RI as RS485 TXDEN |
619 |
UCHAR IFBIsFastSer7; // non-zero if interface is Fast serial |
620 |
UCHAR AIsVCP8; // non-zero if interface is to use VCP drivers |
620 |
UCHAR BIsVCP7; // non-zero if interface is to use VCP drivers |
621 |
UCHAR BIsVCP8; // non-zero if interface is to use VCP drivers |
621 |
UCHAR PowerSaveEnable; // non-zero if using BCBUS7 to save power for self-powered designs |
622 |
UCHAR CIsVCP8; // non-zero if interface is to use VCP drivers |
622 |
// |
623 |
UCHAR DIsVCP8; // non-zero if interface is to use VCP drivers |
623 |
// Rev 8 (FT4232H) Extensions |
624 |
// |
624 |
// |
625 |
// Rev 9 (FT232H) Extensions |
625 |
UCHAR PullDownEnable8; // non-zero if pull down enabled |
626 |
// |
626 |
UCHAR SerNumEnable8; // non-zero if serial number to be used |
627 |
UCHAR PullDownEnableH; // non-zero if pull down enabled |
627 |
UCHAR ASlowSlew; // non-zero if A pins have slow slew |
628 |
UCHAR SerNumEnableH; // non-zero if serial number to be used |
628 |
UCHAR ASchmittInput; // non-zero if A pins are Schmitt input |
629 |
UCHAR ACSlowSlewH; // non-zero if AC pins have slow slew |
629 |
UCHAR ADriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
630 |
UCHAR ACSchmittInputH; // non-zero if AC pins are Schmitt input |
630 |
UCHAR BSlowSlew; // non-zero if B pins have slow slew |
631 |
UCHAR ACDriveCurrentH; // valid values are 4mA, 8mA, 12mA, 16mA |
631 |
UCHAR BSchmittInput; // non-zero if B pins are Schmitt input |
632 |
UCHAR ADSlowSlewH; // non-zero if AD pins have slow slew |
632 |
UCHAR BDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
633 |
UCHAR ADSchmittInputH; // non-zero if AD pins are Schmitt input |
633 |
UCHAR CSlowSlew; // non-zero if C pins have slow slew |
634 |
UCHAR ADDriveCurrentH; // valid values are 4mA, 8mA, 12mA, 16mA |
634 |
UCHAR CSchmittInput; // non-zero if C pins are Schmitt input |
635 |
UCHAR Cbus0H; // Cbus Mux control |
635 |
UCHAR CDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
636 |
UCHAR Cbus1H; // Cbus Mux control |
636 |
UCHAR DSlowSlew; // non-zero if D pins have slow slew |
637 |
UCHAR Cbus2H; // Cbus Mux control |
637 |
UCHAR DSchmittInput; // non-zero if D pins are Schmitt input |
638 |
UCHAR Cbus3H; // Cbus Mux control |
638 |
UCHAR DDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
639 |
UCHAR Cbus4H; // Cbus Mux control |
639 |
UCHAR ARIIsTXDEN; // non-zero if port A uses RI as RS485 TXDEN |
640 |
UCHAR Cbus5H; // Cbus Mux control |
640 |
UCHAR BRIIsTXDEN; // non-zero if port B uses RI as RS485 TXDEN |
641 |
UCHAR Cbus6H; // Cbus Mux control |
641 |
UCHAR CRIIsTXDEN; // non-zero if port C uses RI as RS485 TXDEN |
642 |
UCHAR Cbus7H; // Cbus Mux control |
642 |
UCHAR DRIIsTXDEN; // non-zero if port D uses RI as RS485 TXDEN |
643 |
UCHAR Cbus8H; // Cbus Mux control |
643 |
UCHAR AIsVCP8; // non-zero if interface is to use VCP drivers |
644 |
UCHAR Cbus9H; // Cbus Mux control |
644 |
UCHAR BIsVCP8; // non-zero if interface is to use VCP drivers |
645 |
UCHAR IsFifoH; // non-zero if interface is 245 FIFO |
645 |
UCHAR CIsVCP8; // non-zero if interface is to use VCP drivers |
646 |
UCHAR IsFifoTarH; // non-zero if interface is 245 FIFO CPU target |
646 |
UCHAR DIsVCP8; // non-zero if interface is to use VCP drivers |
647 |
UCHAR IsFastSerH; // non-zero if interface is Fast serial |
647 |
// |
648 |
UCHAR IsFT1248H; // non-zero if interface is FT1248 |
648 |
// Rev 9 (FT232H) Extensions |
649 |
UCHAR FT1248CpolH; // FT1248 clock polarity - clock idle high (1) or clock idle low (0) |
649 |
// |
650 |
UCHAR FT1248LsbH; // FT1248 data is LSB (1) or MSB (0) |
650 |
UCHAR PullDownEnableH; // non-zero if pull down enabled |
651 |
UCHAR FT1248FlowControlH; // FT1248 flow control enable |
651 |
UCHAR SerNumEnableH; // non-zero if serial number to be used |
652 |
UCHAR IsVCPH; // non-zero if interface is to use VCP drivers |
652 |
UCHAR ACSlowSlewH; // non-zero if AC pins have slow slew |
653 |
UCHAR PowerSaveEnableH; // non-zero if using ACBUS7 to save power for self-powered designs |
653 |
UCHAR ACSchmittInputH; // non-zero if AC pins are Schmitt input |
654 |
|
654 |
UCHAR ACDriveCurrentH; // valid values are 4mA, 8mA, 12mA, 16mA |
655 |
} FT_PROGRAM_DATA, *PFT_PROGRAM_DATA; |
655 |
UCHAR ADSlowSlewH; // non-zero if AD pins have slow slew |
656 |
|
656 |
UCHAR ADSchmittInputH; // non-zero if AD pins are Schmitt input |
657 |
|
657 |
UCHAR ADDriveCurrentH; // valid values are 4mA, 8mA, 12mA, 16mA |
658 |
FTD2XX_API |
658 |
UCHAR Cbus0H; // Cbus Mux control |
659 |
FT_STATUS WINAPI FT_EE_Program( |
659 |
UCHAR Cbus1H; // Cbus Mux control |
660 |
FT_HANDLE ftHandle, |
660 |
UCHAR Cbus2H; // Cbus Mux control |
661 |
PFT_PROGRAM_DATA pData |
661 |
UCHAR Cbus3H; // Cbus Mux control |
662 |
); |
662 |
UCHAR Cbus4H; // Cbus Mux control |
663 |
|
663 |
UCHAR Cbus5H; // Cbus Mux control |
664 |
FTD2XX_API |
664 |
UCHAR Cbus6H; // Cbus Mux control |
665 |
FT_STATUS WINAPI FT_EE_ProgramEx( |
665 |
UCHAR Cbus7H; // Cbus Mux control |
666 |
FT_HANDLE ftHandle, |
666 |
UCHAR Cbus8H; // Cbus Mux control |
667 |
PFT_PROGRAM_DATA lpData, |
667 |
UCHAR Cbus9H; // Cbus Mux control |
668 |
char *Manufacturer, |
668 |
UCHAR IsFifoH; // non-zero if interface is 245 FIFO |
669 |
char *ManufacturerId, |
669 |
UCHAR IsFifoTarH; // non-zero if interface is 245 FIFO CPU target |
670 |
char *Description, |
670 |
UCHAR IsFastSerH; // non-zero if interface is Fast serial |
671 |
char *SerialNumber |
671 |
UCHAR IsFT1248H; // non-zero if interface is FT1248 |
672 |
); |
672 |
UCHAR FT1248CpolH; // FT1248 clock polarity - clock idle high (1) or clock idle low (0) |
673 |
|
673 |
UCHAR FT1248LsbH; // FT1248 data is LSB (1) or MSB (0) |
674 |
FTD2XX_API |
674 |
UCHAR FT1248FlowControlH; // FT1248 flow control enable |
675 |
FT_STATUS WINAPI FT_EE_Read( |
675 |
UCHAR IsVCPH; // non-zero if interface is to use VCP drivers |
676 |
FT_HANDLE ftHandle, |
676 |
UCHAR PowerSaveEnableH; // non-zero if using ACBUS7 to save power for self-powered designs |
677 |
PFT_PROGRAM_DATA pData |
677 |
|
678 |
); |
678 |
} FT_PROGRAM_DATA, *PFT_PROGRAM_DATA; |
679 |
|
679 |
|
680 |
FTD2XX_API |
680 |
FTD2XX_API |
681 |
FT_STATUS WINAPI FT_EE_ReadEx( |
681 |
FT_STATUS WINAPI FT_EE_Program( |
682 |
FT_HANDLE ftHandle, |
682 |
FT_HANDLE ftHandle, |
683 |
PFT_PROGRAM_DATA lpData, |
683 |
PFT_PROGRAM_DATA pData |
684 |
char *Manufacturer, |
684 |
); |
685 |
char *ManufacturerId, |
685 |
|
686 |
char *Description, |
686 |
FTD2XX_API |
687 |
char *SerialNumber |
687 |
FT_STATUS WINAPI FT_EE_ProgramEx( |
688 |
); |
688 |
FT_HANDLE ftHandle, |
689 |
|
689 |
PFT_PROGRAM_DATA pData, |
690 |
FTD2XX_API |
690 |
char *Manufacturer, |
691 |
FT_STATUS WINAPI FT_EE_UASize( |
691 |
char *ManufacturerId, |
692 |
FT_HANDLE ftHandle, |
692 |
char *Description, |
693 |
LPDWORD lpdwSize |
693 |
char *SerialNumber |
694 |
); |
694 |
); |
695 |
|
695 |
|
696 |
FTD2XX_API |
696 |
FTD2XX_API |
697 |
FT_STATUS WINAPI FT_EE_UAWrite( |
697 |
FT_STATUS WINAPI FT_EE_Read( |
698 |
FT_HANDLE ftHandle, |
698 |
FT_HANDLE ftHandle, |
699 |
PUCHAR pucData, |
699 |
PFT_PROGRAM_DATA pData |
700 |
DWORD dwDataLen |
700 |
); |
701 |
); |
701 |
|
702 |
|
702 |
FTD2XX_API |
703 |
FTD2XX_API |
703 |
FT_STATUS WINAPI FT_EE_ReadEx( |
704 |
FT_STATUS WINAPI FT_EE_UARead( |
704 |
FT_HANDLE ftHandle, |
705 |
FT_HANDLE ftHandle, |
705 |
PFT_PROGRAM_DATA pData, |
706 |
PUCHAR pucData, |
706 |
char *Manufacturer, |
707 |
DWORD dwDataLen, |
707 |
char *ManufacturerId, |
708 |
LPDWORD lpdwBytesRead |
708 |
char *Description, |
709 |
); |
709 |
char *SerialNumber |
710 |
|
710 |
); |
711 |
FTD2XX_API |
711 |
|
712 |
FT_STATUS WINAPI FT_SetLatencyTimer( |
712 |
FTD2XX_API |
713 |
FT_HANDLE ftHandle, |
713 |
FT_STATUS WINAPI FT_EE_UASize( |
714 |
UCHAR ucLatency |
714 |
FT_HANDLE ftHandle, |
715 |
); |
715 |
LPDWORD lpdwSize |
716 |
|
716 |
); |
717 |
FTD2XX_API |
717 |
|
718 |
FT_STATUS WINAPI FT_GetLatencyTimer( |
718 |
FTD2XX_API |
719 |
FT_HANDLE ftHandle, |
719 |
FT_STATUS WINAPI FT_EE_UAWrite( |
720 |
PUCHAR pucLatency |
720 |
FT_HANDLE ftHandle, |
721 |
); |
721 |
PUCHAR pucData, |
722 |
|
722 |
DWORD dwDataLen |
723 |
FTD2XX_API |
723 |
); |
724 |
FT_STATUS WINAPI FT_SetBitMode( |
724 |
|
725 |
FT_HANDLE ftHandle, |
725 |
FTD2XX_API |
726 |
UCHAR ucMask, |
726 |
FT_STATUS WINAPI FT_EE_UARead( |
727 |
UCHAR ucEnable |
727 |
FT_HANDLE ftHandle, |
728 |
); |
728 |
PUCHAR pucData, |
729 |
|
729 |
DWORD dwDataLen, |
730 |
FTD2XX_API |
730 |
LPDWORD lpdwBytesRead |
731 |
FT_STATUS WINAPI FT_GetBitMode( |
731 |
); |
732 |
FT_HANDLE ftHandle, |
732 |
|
733 |
PUCHAR pucMode |
733 |
|
734 |
); |
734 |
typedef struct ft_eeprom_header { |
735 |
|
735 |
FT_DEVICE deviceType; // FTxxxx device type to be programmed |
736 |
FTD2XX_API |
736 |
// Device descriptor options |
737 |
FT_STATUS WINAPI FT_SetUSBParameters( |
737 |
WORD VendorId; // 0x0403 |
738 |
FT_HANDLE ftHandle, |
738 |
WORD ProductId; // 0x6001 |
739 |
ULONG ulInTransferSize, |
739 |
UCHAR SerNumEnable; // non-zero if serial number to be used |
740 |
ULONG ulOutTransferSize |
740 |
// Config descriptor options |
741 |
); |
741 |
WORD MaxPower; // 0 < MaxPower <= 500 |
742 |
|
742 |
UCHAR SelfPowered; // 0 = bus powered, 1 = self powered |
743 |
FTD2XX_API |
743 |
UCHAR RemoteWakeup; // 0 = not capable, 1 = capable |
744 |
FT_STATUS WINAPI FT_GetDeviceInfo( |
744 |
// Hardware options |
745 |
FT_HANDLE ftHandle, |
745 |
UCHAR PullDownEnable; // non-zero if pull down in suspend enabled |
746 |
FT_DEVICE *lpftDevice, |
746 |
} FT_EEPROM_HEADER, *PFT_EEPROM_HEADER; |
747 |
LPDWORD lpdwID, |
747 |
|
748 |
PCHAR SerialNumber, |
748 |
|
749 |
PCHAR Description, |
749 |
// FT232B EEPROM structure for use with FT_EEPROM_Read and FT_EEPROM_Program |
750 |
LPVOID Dummy |
750 |
typedef struct ft_eeprom_232b { |
751 |
); |
751 |
// Common header |
752 |
|
752 |
FT_EEPROM_HEADER common; // common elements for all device EEPROMs |
753 |
FTD2XX_API |
753 |
} FT_EEPROM_232B, *PFT_EEPROM_232B; |
754 |
FT_STATUS WINAPI FT_GetDeviceLocId( |
754 |
|
755 |
FT_HANDLE ftHandle, |
755 |
|
756 |
LPDWORD lpdwLocId |
756 |
// FT2232 EEPROM structure for use with FT_EEPROM_Read and FT_EEPROM_Program |
757 |
); |
757 |
typedef struct ft_eeprom_2232 { |
758 |
|
758 |
// Common header |
759 |
FTD2XX_API |
759 |
FT_EEPROM_HEADER common; // common elements for all device EEPROMs |
760 |
FT_STATUS WINAPI FT_StopInTask( |
760 |
// Drive options |
761 |
FT_HANDLE ftHandle |
761 |
UCHAR AIsHighCurrent; // non-zero if interface is high current |
762 |
); |
762 |
UCHAR BIsHighCurrent; // non-zero if interface is high current |
763 |
|
763 |
// Hardware options |
764 |
FTD2XX_API |
764 |
UCHAR AIsFifo; // non-zero if interface is 245 FIFO |
765 |
FT_STATUS WINAPI FT_RestartInTask( |
765 |
UCHAR AIsFifoTar; // non-zero if interface is 245 FIFO CPU target |
766 |
FT_HANDLE ftHandle |
766 |
UCHAR AIsFastSer; // non-zero if interface is Fast serial |
767 |
); |
767 |
UCHAR BIsFifo; // non-zero if interface is 245 FIFO |
768 |
|
768 |
UCHAR BIsFifoTar; // non-zero if interface is 245 FIFO CPU target |
769 |
FTD2XX_API |
769 |
UCHAR BIsFastSer; // non-zero if interface is Fast serial |
770 |
FT_STATUS WINAPI FT_SetResetPipeRetryCount( |
770 |
// Driver option |
771 |
FT_HANDLE ftHandle, |
771 |
UCHAR ADriverType; // |
772 |
DWORD dwCount |
772 |
UCHAR BDriverType; // |
773 |
); |
773 |
} FT_EEPROM_2232, *PFT_EEPROM_2232; |
774 |
|
774 |
|
775 |
FTD2XX_API |
775 |
|
776 |
FT_STATUS WINAPI FT_ResetPort( |
776 |
// FT232R EEPROM structure for use with FT_EEPROM_Read and FT_EEPROM_Program |
777 |
FT_HANDLE ftHandle |
777 |
typedef struct ft_eeprom_232r { |
778 |
); |
778 |
// Common header |
779 |
|
779 |
FT_EEPROM_HEADER common; // common elements for all device EEPROMs |
780 |
FTD2XX_API |
780 |
// Drive options |
781 |
FT_STATUS WINAPI FT_CyclePort( |
781 |
UCHAR IsHighCurrent; // non-zero if interface is high current |
782 |
FT_HANDLE ftHandle |
782 |
// Hardware options |
783 |
); |
783 |
UCHAR UseExtOsc; // Use External Oscillator |
784 |
|
784 |
UCHAR InvertTXD; // non-zero if invert TXD |
785 |
// |
785 |
UCHAR InvertRXD; // non-zero if invert RXD |
786 |
// Win32-type functions |
786 |
UCHAR InvertRTS; // non-zero if invert RTS |
787 |
// |
787 |
UCHAR InvertCTS; // non-zero if invert CTS |
788 |
|
788 |
UCHAR InvertDTR; // non-zero if invert DTR |
789 |
FTD2XX_API |
789 |
UCHAR InvertDSR; // non-zero if invert DSR |
790 |
FT_HANDLE WINAPI FT_W32_CreateFile( |
790 |
UCHAR InvertDCD; // non-zero if invert DCD |
791 |
LPCSTR lpszName, |
791 |
UCHAR InvertRI; // non-zero if invert RI |
792 |
DWORD dwAccess, |
792 |
UCHAR Cbus0; // Cbus Mux control |
793 |
DWORD dwShareMode, |
793 |
UCHAR Cbus1; // Cbus Mux control |
794 |
LPSECURITY_ATTRIBUTES lpSecurityAttributes, |
794 |
UCHAR Cbus2; // Cbus Mux control |
795 |
DWORD dwCreate, |
795 |
UCHAR Cbus3; // Cbus Mux control |
796 |
DWORD dwAttrsAndFlags, |
796 |
UCHAR Cbus4; // Cbus Mux control |
797 |
HANDLE hTemplate |
797 |
// Driver option |
798 |
); |
798 |
UCHAR DriverType; // |
799 |
|
799 |
} FT_EEPROM_232R, *PFT_EEPROM_232R; |
800 |
FTD2XX_API |
800 |
|
801 |
BOOL WINAPI FT_W32_CloseHandle( |
801 |
|
802 |
FT_HANDLE ftHandle |
802 |
// FT2232H EEPROM structure for use with FT_EEPROM_Read and FT_EEPROM_Program |
803 |
); |
803 |
typedef struct ft_eeprom_2232h { |
804 |
|
804 |
// Common header |
805 |
FTD2XX_API |
805 |
FT_EEPROM_HEADER common; // common elements for all device EEPROMs |
806 |
BOOL WINAPI FT_W32_ReadFile( |
806 |
// Drive options |
807 |
FT_HANDLE ftHandle, |
807 |
UCHAR ALSlowSlew; // non-zero if AL pins have slow slew |
808 |
LPVOID lpBuffer, |
808 |
UCHAR ALSchmittInput; // non-zero if AL pins are Schmitt input |
809 |
DWORD nBufferSize, |
809 |
UCHAR ALDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
810 |
LPDWORD lpBytesReturned, |
810 |
UCHAR AHSlowSlew; // non-zero if AH pins have slow slew |
811 |
LPOVERLAPPED lpOverlapped |
811 |
UCHAR AHSchmittInput; // non-zero if AH pins are Schmitt input |
812 |
); |
812 |
UCHAR AHDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
813 |
|
813 |
UCHAR BLSlowSlew; // non-zero if BL pins have slow slew |
814 |
FTD2XX_API |
814 |
UCHAR BLSchmittInput; // non-zero if BL pins are Schmitt input |
815 |
BOOL WINAPI FT_W32_WriteFile( |
815 |
UCHAR BLDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
816 |
FT_HANDLE ftHandle, |
816 |
UCHAR BHSlowSlew; // non-zero if BH pins have slow slew |
817 |
LPVOID lpBuffer, |
817 |
UCHAR BHSchmittInput; // non-zero if BH pins are Schmitt input |
818 |
DWORD nBufferSize, |
818 |
UCHAR BHDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
819 |
LPDWORD lpBytesWritten, |
819 |
// Hardware options |
820 |
LPOVERLAPPED lpOverlapped |
820 |
UCHAR AIsFifo; // non-zero if interface is 245 FIFO |
821 |
); |
821 |
UCHAR AIsFifoTar; // non-zero if interface is 245 FIFO CPU target |
822 |
|
822 |
UCHAR AIsFastSer; // non-zero if interface is Fast serial |
823 |
FTD2XX_API |
823 |
UCHAR BIsFifo; // non-zero if interface is 245 FIFO |
824 |
DWORD WINAPI FT_W32_GetLastError( |
824 |
UCHAR BIsFifoTar; // non-zero if interface is 245 FIFO CPU target |
825 |
FT_HANDLE ftHandle |
825 |
UCHAR BIsFastSer; // non-zero if interface is Fast serial |
826 |
); |
826 |
UCHAR PowerSaveEnable; // non-zero if using BCBUS7 to save power for self-powered designs |
827 |
|
827 |
// Driver option |
828 |
FTD2XX_API |
828 |
UCHAR ADriverType; // |
829 |
BOOL WINAPI FT_W32_GetOverlappedResult( |
829 |
UCHAR BDriverType; // |
830 |
FT_HANDLE ftHandle, |
830 |
} FT_EEPROM_2232H, *PFT_EEPROM_2232H; |
831 |
LPOVERLAPPED lpOverlapped, |
831 |
|
832 |
LPDWORD lpdwBytesTransferred, |
832 |
|
833 |
BOOL bWait |
833 |
// FT4232H EEPROM structure for use with FT_EEPROM_Read and FT_EEPROM_Program |
834 |
); |
834 |
typedef struct ft_eeprom_4232h { |
835 |
|
835 |
// Common header |
836 |
FTD2XX_API |
836 |
FT_EEPROM_HEADER common; // common elements for all device EEPROMs |
837 |
BOOL WINAPI FT_W32_CancelIo( |
837 |
// Drive options |
838 |
FT_HANDLE ftHandle |
838 |
UCHAR ASlowSlew; // non-zero if A pins have slow slew |
839 |
); |
839 |
UCHAR ASchmittInput; // non-zero if A pins are Schmitt input |
840 |
|
840 |
UCHAR ADriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
841 |
|
841 |
UCHAR BSlowSlew; // non-zero if B pins have slow slew |
842 |
// |
842 |
UCHAR BSchmittInput; // non-zero if B pins are Schmitt input |
843 |
// Win32 COMM API type functions |
843 |
UCHAR BDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
844 |
// |
844 |
UCHAR CSlowSlew; // non-zero if C pins have slow slew |
845 |
typedef struct _FTCOMSTAT { |
845 |
UCHAR CSchmittInput; // non-zero if C pins are Schmitt input |
846 |
DWORD fCtsHold : 1; |
846 |
UCHAR CDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
847 |
DWORD fDsrHold : 1; |
847 |
UCHAR DSlowSlew; // non-zero if D pins have slow slew |
848 |
DWORD fRlsdHold : 1; |
848 |
UCHAR DSchmittInput; // non-zero if D pins are Schmitt input |
849 |
DWORD fXoffHold : 1; |
849 |
UCHAR DDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
850 |
DWORD fXoffSent : 1; |
850 |
// Hardware options |
851 |
DWORD fEof : 1; |
851 |
UCHAR ARIIsTXDEN; // non-zero if port A uses RI as RS485 TXDEN |
852 |
DWORD fTxim : 1; |
852 |
UCHAR BRIIsTXDEN; // non-zero if port B uses RI as RS485 TXDEN |
853 |
DWORD fReserved : 25; |
853 |
UCHAR CRIIsTXDEN; // non-zero if port C uses RI as RS485 TXDEN |
854 |
DWORD cbInQue; |
854 |
UCHAR DRIIsTXDEN; // non-zero if port D uses RI as RS485 TXDEN |
855 |
DWORD cbOutQue; |
855 |
// Driver option |
856 |
} FTCOMSTAT, *LPFTCOMSTAT; |
856 |
UCHAR ADriverType; // |
857 |
|
857 |
UCHAR BDriverType; // |
858 |
typedef struct _FTDCB { |
858 |
UCHAR CDriverType; // |
859 |
DWORD DCBlength; /* sizeof(FTDCB) */ |
859 |
UCHAR DDriverType; // |
860 |
DWORD BaudRate; /* Baudrate at which running */ |
860 |
} FT_EEPROM_4232H, *PFT_EEPROM_4232H; |
861 |
DWORD fBinary: 1; /* Binary Mode (skip EOF check) */ |
861 |
|
862 |
DWORD fParity: 1; /* Enable parity checking */ |
862 |
|
863 |
DWORD fOutxCtsFlow:1; /* CTS handshaking on output */ |
863 |
// FT232H EEPROM structure for use with FT_EEPROM_Read and FT_EEPROM_Program |
864 |
DWORD fOutxDsrFlow:1; /* DSR handshaking on output */ |
864 |
typedef struct ft_eeprom_232h { |
865 |
DWORD fDtrControl:2; /* DTR Flow control */ |
865 |
// Common header |
866 |
DWORD fDsrSensitivity:1; /* DSR Sensitivity */ |
866 |
FT_EEPROM_HEADER common; // common elements for all device EEPROMs |
867 |
DWORD fTXContinueOnXoff: 1; /* Continue TX when Xoff sent */ |
867 |
// Drive options |
868 |
DWORD fOutX: 1; /* Enable output X-ON/X-OFF */ |
868 |
UCHAR ACSlowSlew; // non-zero if AC bus pins have slow slew |
869 |
DWORD fInX: 1; /* Enable input X-ON/X-OFF */ |
869 |
UCHAR ACSchmittInput; // non-zero if AC bus pins are Schmitt input |
870 |
DWORD fErrorChar: 1; /* Enable Err Replacement */ |
870 |
UCHAR ACDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
871 |
DWORD fNull: 1; /* Enable Null stripping */ |
871 |
UCHAR ADSlowSlew; // non-zero if AD bus pins have slow slew |
872 |
DWORD fRtsControl:2; /* Rts Flow control */ |
872 |
UCHAR ADSchmittInput; // non-zero if AD bus pins are Schmitt input |
873 |
DWORD fAbortOnError:1; /* Abort all reads and writes on Error */ |
873 |
UCHAR ADDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
874 |
DWORD fDummy2:17; /* Reserved */ |
874 |
// CBUS options |
875 |
WORD wReserved; /* Not currently used */ |
875 |
UCHAR Cbus0; // Cbus Mux control |
876 |
WORD XonLim; /* Transmit X-ON threshold */ |
876 |
UCHAR Cbus1; // Cbus Mux control |
877 |
WORD XoffLim; /* Transmit X-OFF threshold */ |
877 |
UCHAR Cbus2; // Cbus Mux control |
878 |
BYTE ByteSize; /* Number of bits/byte, 4-8 */ |
878 |
UCHAR Cbus3; // Cbus Mux control |
879 |
BYTE Parity; /* 0-4=None,Odd,Even,Mark,Space */ |
879 |
UCHAR Cbus4; // Cbus Mux control |
880 |
BYTE StopBits; /* 0,1,2 = 1, 1.5, 2 */ |
880 |
UCHAR Cbus5; // Cbus Mux control |
881 |
char XonChar; /* Tx and Rx X-ON character */ |
881 |
UCHAR Cbus6; // Cbus Mux control |
882 |
char XoffChar; /* Tx and Rx X-OFF character */ |
882 |
UCHAR Cbus7; // Cbus Mux control |
883 |
char ErrorChar; /* Error replacement char */ |
883 |
UCHAR Cbus8; // Cbus Mux control |
884 |
char EofChar; /* End of Input character */ |
884 |
UCHAR Cbus9; // Cbus Mux control |
885 |
char EvtChar; /* Received Event character */ |
885 |
// FT1248 options |
886 |
WORD wReserved1; /* Fill for now. */ |
886 |
UCHAR FT1248Cpol; // FT1248 clock polarity - clock idle high (1) or clock idle low (0) |
887 |
} FTDCB, *LPFTDCB; |
887 |
UCHAR FT1248Lsb; // FT1248 data is LSB (1) or MSB (0) |
888 |
|
888 |
UCHAR FT1248FlowControl; // FT1248 flow control enable |
889 |
typedef struct _FTTIMEOUTS { |
889 |
// Hardware options |
890 |
DWORD ReadIntervalTimeout; /* Maximum time between read chars. */ |
890 |
UCHAR IsFifo; // non-zero if interface is 245 FIFO |
891 |
DWORD ReadTotalTimeoutMultiplier; /* Multiplier of characters. */ |
891 |
UCHAR IsFifoTar; // non-zero if interface is 245 FIFO CPU target |
892 |
DWORD ReadTotalTimeoutConstant; /* Constant in milliseconds. */ |
892 |
UCHAR IsFastSer; // non-zero if interface is Fast serial |
893 |
DWORD WriteTotalTimeoutMultiplier; /* Multiplier of characters. */ |
893 |
UCHAR IsFT1248 ; // non-zero if interface is FT1248 |
894 |
DWORD WriteTotalTimeoutConstant; /* Constant in milliseconds. */ |
894 |
UCHAR PowerSaveEnable; // |
895 |
} FTTIMEOUTS,*LPFTTIMEOUTS; |
895 |
// Driver option |
896 |
|
896 |
UCHAR DriverType; // |
897 |
|
897 |
} FT_EEPROM_232H, *PFT_EEPROM_232H; |
898 |
FTD2XX_API |
898 |
|
899 |
BOOL WINAPI FT_W32_ClearCommBreak( |
899 |
|
900 |
FT_HANDLE ftHandle |
900 |
// FT X Series EEPROM structure for use with FT_EEPROM_Read and FT_EEPROM_Program |
901 |
); |
901 |
typedef struct ft_eeprom_x_series { |
902 |
|
902 |
// Common header |
903 |
FTD2XX_API |
903 |
FT_EEPROM_HEADER common; // common elements for all device EEPROMs |
904 |
BOOL WINAPI FT_W32_ClearCommError( |
904 |
// Drive options |
905 |
FT_HANDLE ftHandle, |
905 |
UCHAR ACSlowSlew; // non-zero if AC bus pins have slow slew |
906 |
LPDWORD lpdwErrors, |
906 |
UCHAR ACSchmittInput; // non-zero if AC bus pins are Schmitt input |
907 |
LPFTCOMSTAT lpftComstat |
907 |
UCHAR ACDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
908 |
); |
908 |
UCHAR ADSlowSlew; // non-zero if AD bus pins have slow slew |
909 |
|
909 |
UCHAR ADSchmittInput; // non-zero if AD bus pins are Schmitt input |
910 |
FTD2XX_API |
910 |
UCHAR ADDriveCurrent; // valid values are 4mA, 8mA, 12mA, 16mA |
911 |
BOOL WINAPI FT_W32_EscapeCommFunction( |
911 |
// CBUS options |
912 |
FT_HANDLE ftHandle, |
912 |
UCHAR Cbus0; // Cbus Mux control |
913 |
DWORD dwFunc |
913 |
UCHAR Cbus1; // Cbus Mux control |
914 |
); |
914 |
UCHAR Cbus2; // Cbus Mux control |
915 |
|
915 |
UCHAR Cbus3; // Cbus Mux control |
916 |
FTD2XX_API |
916 |
UCHAR Cbus4; // Cbus Mux control |
917 |
BOOL WINAPI FT_W32_GetCommModemStatus( |
917 |
UCHAR Cbus5; // Cbus Mux control |
918 |
FT_HANDLE ftHandle, |
918 |
UCHAR Cbus6; // Cbus Mux control |
919 |
LPDWORD lpdwModemStatus |
919 |
// UART signal options |
920 |
); |
920 |
UCHAR InvertTXD; // non-zero if invert TXD |
921 |
|
921 |
UCHAR InvertRXD; // non-zero if invert RXD |
922 |
FTD2XX_API |
922 |
UCHAR InvertRTS; // non-zero if invert RTS |
923 |
BOOL WINAPI FT_W32_GetCommState( |
923 |
UCHAR InvertCTS; // non-zero if invert CTS |
924 |
FT_HANDLE ftHandle, |
924 |
UCHAR InvertDTR; // non-zero if invert DTR |
925 |
LPFTDCB lpftDcb |
925 |
UCHAR InvertDSR; // non-zero if invert DSR |
926 |
); |
926 |
UCHAR InvertDCD; // non-zero if invert DCD |
927 |
|
927 |
UCHAR InvertRI; // non-zero if invert RI |
928 |
FTD2XX_API |
928 |
// Battery Charge Detect options |
929 |
BOOL WINAPI FT_W32_GetCommTimeouts( |
929 |
UCHAR BCDEnable; // Enable Battery Charger Detection |
930 |
FT_HANDLE ftHandle, |
930 |
UCHAR BCDForceCbusPWREN; // asserts the power enable signal on CBUS when charging port detected |
931 |
FTTIMEOUTS *pTimeouts |
931 |
UCHAR BCDDisableSleep; // forces the device never to go into sleep mode |
932 |
); |
932 |
// I2C options |
933 |
|
933 |
WORD I2CSlaveAddress; // I2C slave device address |
934 |
FTD2XX_API |
934 |
DWORD I2CDeviceId; // I2C device ID |
935 |
BOOL WINAPI FT_W32_PurgeComm( |
935 |
UCHAR I2CDisableSchmitt; // Disable I2C Schmitt trigger |
936 |
FT_HANDLE ftHandle, |
936 |
// FT1248 options |
937 |
DWORD dwMask |
937 |
UCHAR FT1248Cpol; // FT1248 clock polarity - clock idle high (1) or clock idle low (0) |
938 |
); |
938 |
UCHAR FT1248Lsb; // FT1248 data is LSB (1) or MSB (0) |
939 |
|
939 |
UCHAR FT1248FlowControl; // FT1248 flow control enable |
940 |
FTD2XX_API |
940 |
// Hardware options |
941 |
BOOL WINAPI FT_W32_SetCommBreak( |
941 |
UCHAR RS485EchoSuppress; // |
942 |
FT_HANDLE ftHandle |
942 |
UCHAR PowerSaveEnable; // |
943 |
); |
943 |
// Driver option |
944 |
|
944 |
UCHAR DriverType; // |
945 |
FTD2XX_API |
945 |
} FT_EEPROM_X_SERIES, *PFT_EEPROM_X_SERIES; |
946 |
BOOL WINAPI FT_W32_SetCommMask( |
946 |
|
947 |
FT_HANDLE ftHandle, |
947 |
|
948 |
ULONG ulEventMask |
948 |
FTD2XX_API |
949 |
); |
949 |
FT_STATUS WINAPI FT_EEPROM_Read( |
950 |
|
950 |
FT_HANDLE ftHandle, |
951 |
FTD2XX_API |
951 |
void *eepromData, |
952 |
BOOL WINAPI FT_W32_SetCommState( |
952 |
DWORD eepromDataSize, |
953 |
FT_HANDLE ftHandle, |
953 |
char *Manufacturer, |
954 |
LPFTDCB lpftDcb |
954 |
char *ManufacturerId, |
955 |
); |
955 |
char *Description, |
956 |
|
956 |
char *SerialNumber |
957 |
FTD2XX_API |
957 |
); |
958 |
BOOL WINAPI FT_W32_SetCommTimeouts( |
958 |
|
959 |
FT_HANDLE ftHandle, |
959 |
|
960 |
FTTIMEOUTS *pTimeouts |
960 |
FTD2XX_API |
961 |
); |
961 |
FT_STATUS WINAPI FT_EEPROM_Program( |
962 |
|
962 |
FT_HANDLE ftHandle, |
963 |
FTD2XX_API |
963 |
void *eepromData, |
964 |
BOOL WINAPI FT_W32_SetupComm( |
964 |
DWORD eepromDataSize, |
965 |
FT_HANDLE ftHandle, |
965 |
char *Manufacturer, |
966 |
DWORD dwReadBufferSize, |
966 |
char *ManufacturerId, |
967 |
DWORD dwWriteBufferSize |
967 |
char *Description, |
968 |
); |
968 |
char *SerialNumber |
969 |
|
969 |
); |
970 |
FTD2XX_API |
970 |
|
971 |
BOOL WINAPI FT_W32_WaitCommEvent( |
971 |
|
972 |
FT_HANDLE ftHandle, |
972 |
FTD2XX_API |
973 |
PULONG pulEvent, |
973 |
FT_STATUS WINAPI FT_SetLatencyTimer( |
974 |
LPOVERLAPPED lpOverlapped |
974 |
FT_HANDLE ftHandle, |
975 |
); |
975 |
UCHAR ucLatency |
976 |
|
976 |
); |
977 |
// |
977 |
|
978 |
// Device information |
978 |
FTD2XX_API |
979 |
// |
979 |
FT_STATUS WINAPI FT_GetLatencyTimer( |
980 |
|
980 |
FT_HANDLE ftHandle, |
981 |
typedef struct _ft_device_list_info_node { |
981 |
PUCHAR pucLatency |
982 |
ULONG Flags; |
982 |
); |
983 |
ULONG Type; |
983 |
|
984 |
ULONG ID; |
984 |
FTD2XX_API |
985 |
DWORD LocId; |
985 |
FT_STATUS WINAPI FT_SetBitMode( |
986 |
char SerialNumber[16]; |
986 |
FT_HANDLE ftHandle, |
987 |
char Description[64]; |
987 |
UCHAR ucMask, |
988 |
FT_HANDLE ftHandle; |
988 |
UCHAR ucEnable |
989 |
} FT_DEVICE_LIST_INFO_NODE; |
989 |
); |
990 |
|
990 |
|
991 |
// Device information flags |
991 |
FTD2XX_API |
992 |
enum { |
992 |
FT_STATUS WINAPI FT_GetBitMode( |
993 |
FT_FLAGS_OPENED = 1, |
993 |
FT_HANDLE ftHandle, |
994 |
FT_FLAGS_HISPEED = 2 |
994 |
PUCHAR pucMode |
995 |
}; |
995 |
); |
996 |
|
996 |
|
997 |
FTD2XX_API |
997 |
FTD2XX_API |
998 |
FT_STATUS WINAPI FT_CreateDeviceInfoList( |
998 |
FT_STATUS WINAPI FT_SetUSBParameters( |
999 |
LPDWORD lpdwNumDevs |
999 |
FT_HANDLE ftHandle, |
1000 |
); |
1000 |
ULONG ulInTransferSize, |
1001 |
|
1001 |
ULONG ulOutTransferSize |
1002 |
FTD2XX_API |
1002 |
); |
1003 |
FT_STATUS WINAPI FT_GetDeviceInfoList( |
1003 |
|
1004 |
FT_DEVICE_LIST_INFO_NODE *pDest, |
1004 |
FTD2XX_API |
1005 |
LPDWORD lpdwNumDevs |
1005 |
FT_STATUS WINAPI FT_SetDeadmanTimeout( |
1006 |
); |
1006 |
FT_HANDLE ftHandle, |
1007 |
|
1007 |
ULONG ulDeadmanTimeout |
1008 |
FTD2XX_API |
1008 |
); |
1009 |
FT_STATUS WINAPI FT_GetDeviceInfoDetail( |
1009 |
|
1010 |
DWORD dwIndex, |
1010 |
#ifndef _WIN32 |
1011 |
LPDWORD lpdwFlags, |
1011 |
// Extra functions for non-Windows platforms to compensate |
1012 |
LPDWORD lpdwType, |
1012 |
// for lack of .INF file to specify Vendor and Product IDs. |
1013 |
LPDWORD lpdwID, |
1013 |
|
1014 |
LPDWORD lpdwLocId, |
1014 |
FTD2XX_API |
1015 |
LPVOID lpSerialNumber, |
1015 |
FT_STATUS FT_SetVIDPID( |
1016 |
LPVOID lpDescription, |
1016 |
DWORD dwVID, |
1017 |
FT_HANDLE *pftHandle |
1017 |
DWORD dwPID |
1018 |
); |
1018 |
); |
1019 |
|
1019 |
|
1020 |
|
1020 |
FTD2XX_API |
1021 |
// |
1021 |
FT_STATUS FT_GetVIDPID( |
1022 |
// Version information |
1022 |
DWORD * pdwVID, |
1023 |
// |
1023 |
DWORD * pdwPID |
1024 |
|
1024 |
); |
1025 |
FTD2XX_API |
1025 |
|
1026 |
FT_STATUS WINAPI FT_GetDriverVersion( |
1026 |
FTD2XX_API |
1027 |
FT_HANDLE ftHandle, |
1027 |
FT_STATUS WINAPI FT_GetDeviceLocId( |
1028 |
LPDWORD lpdwVersion |
1028 |
FT_HANDLE ftHandle, |
1029 |
); |
1029 |
LPDWORD lpdwLocId |
1030 |
|
1030 |
); |
1031 |
FTD2XX_API |
1031 |
#endif // _WIN32 |
1032 |
FT_STATUS WINAPI FT_GetLibraryVersion( |
1032 |
|
1033 |
LPDWORD lpdwVersion |
1033 |
FTD2XX_API |
1034 |
); |
1034 |
FT_STATUS WINAPI FT_GetDeviceInfo( |
1035 |
|
1035 |
FT_HANDLE ftHandle, |
1036 |
// |
1036 |
FT_DEVICE *lpftDevice, |
1037 |
// Events |
1037 |
LPDWORD lpdwID, |
1038 |
// |
1038 |
PCHAR SerialNumber, |
1039 |
|
1039 |
PCHAR Description, |
1040 |
#define EV_RXCHAR 0x0001 // Any Character received |
1040 |
LPVOID Dummy |
1041 |
#define EV_RXFLAG 0x0002 // Received certain character |
1041 |
); |
1042 |
#define EV_TXEMPTY 0x0004 // Transmitt Queue Empty |
1042 |
|
1043 |
#define EV_CTS 0x0008 // CTS changed state |
1043 |
FTD2XX_API |
1044 |
#define EV_DSR 0x0010 // DSR changed state |
1044 |
FT_STATUS WINAPI FT_StopInTask( |
1045 |
#define EV_RLSD 0x0020 // RLSD changed state |
1045 |
FT_HANDLE ftHandle |
1046 |
#define EV_BREAK 0x0040 // BREAK received |
1046 |
); |
1047 |
#define EV_ERR 0x0080 // Line status error occurred |
1047 |
|
1048 |
#define EV_RING 0x0100 // Ring signal detected |
1048 |
FTD2XX_API |
1049 |
#define EV_PERR 0x0200 // Printer error occured |
1049 |
FT_STATUS WINAPI FT_RestartInTask( |
1050 |
#define EV_RX80FULL 0x0400 // Receive buffer is 80 percent full |
1050 |
FT_HANDLE ftHandle |
1051 |
#define EV_EVENT1 0x0800 // Provider specific event 1 |
1051 |
); |
1052 |
#define EV_EVENT2 0x1000 // Provider specific event 2 |
1052 |
|
1053 |
|
1053 |
FTD2XX_API |
1054 |
// |
1054 |
FT_STATUS WINAPI FT_SetResetPipeRetryCount( |
1055 |
// Escape Functions |
1055 |
FT_HANDLE ftHandle, |
1056 |
// |
1056 |
DWORD dwCount |
1057 |
|
1057 |
); |
1058 |
#define SETXOFF 1 // Simulate XOFF received |
1058 |
|
1059 |
#define SETXON 2 // Simulate XON received |
1059 |
FTD2XX_API |
1060 |
#define SETRTS 3 // Set RTS high |
1060 |
FT_STATUS WINAPI FT_ResetPort( |
1061 |
#define CLRRTS 4 // Set RTS low |
1061 |
FT_HANDLE ftHandle |
1062 |
#define SETDTR 5 // Set DTR high |
1062 |
); |
1063 |
#define CLRDTR 6 // Set DTR low |
1063 |
|
1064 |
#define RESETDEV 7 // Reset device if possible |
1064 |
FTD2XX_API |
1065 |
#define SETBREAK 8 // Set the device break line. |
1065 |
FT_STATUS WINAPI FT_CyclePort( |
1066 |
#define CLRBREAK 9 // Clear the device break line. |
1066 |
FT_HANDLE ftHandle |
1067 |
|
1067 |
); |
1068 |
// |
1068 |
|
1069 |
// PURGE function flags. |
1069 |
|
1070 |
// |
1070 |
// |
1071 |
#define PURGE_TXABORT 0x0001 // Kill the pending/current writes to the comm port. |
1071 |
// Win32-type functions |
1072 |
#define PURGE_RXABORT 0x0002 // Kill the pending/current reads to the comm port. |
1072 |
// |
1073 |
#define PURGE_TXCLEAR 0x0004 // Kill the transmit queue if there. |
1073 |
|
1074 |
#define PURGE_RXCLEAR 0x0008 // Kill the typeahead buffer if there. |
1074 |
FTD2XX_API |
1075 |
|
1075 |
FT_HANDLE WINAPI FT_W32_CreateFile( |
1076 |
#ifdef __cplusplus |
1076 |
LPCTSTR lpszName, |
1077 |
} |
1077 |
DWORD dwAccess, |
1078 |
#endif |
1078 |
DWORD dwShareMode, |
1079 |
|
1079 |
LPSECURITY_ATTRIBUTES lpSecurityAttributes, |
1080 |
|
1080 |
DWORD dwCreate, |
1081 |
#endif /* FTD2XX_H */ |
1081 |
DWORD dwAttrsAndFlags, |
1082 |
|
1082 |
HANDLE hTemplate |
1083 |
|
1083 |
); |
1084 |
|
1084 |
|
1085 |
|
1085 |
FTD2XX_API |
1086 |
|
1086 |
BOOL WINAPI FT_W32_CloseHandle( |
1087 |
|
1087 |
FT_HANDLE ftHandle |
- |
|
1088 |
); |
- |
|
1089 |
|
- |
|
1090 |
FTD2XX_API |
- |
|
1091 |
BOOL WINAPI FT_W32_ReadFile( |
- |
|
1092 |
FT_HANDLE ftHandle, |
- |
|
1093 |
LPVOID lpBuffer, |
- |
|
1094 |
DWORD nBufferSize, |
- |
|
1095 |
LPDWORD lpBytesReturned, |
- |
|
1096 |
LPOVERLAPPED lpOverlapped |
- |
|
1097 |
); |
- |
|
1098 |
|
- |
|
1099 |
FTD2XX_API |
- |
|
1100 |
BOOL WINAPI FT_W32_WriteFile( |
- |
|
1101 |
FT_HANDLE ftHandle, |
- |
|
1102 |
LPVOID lpBuffer, |
- |
|
1103 |
DWORD nBufferSize, |
- |
|
1104 |
LPDWORD lpBytesWritten, |
- |
|
1105 |
LPOVERLAPPED lpOverlapped |
- |
|
1106 |
); |
- |
|
1107 |
|
- |
|
1108 |
FTD2XX_API |
- |
|
1109 |
DWORD WINAPI FT_W32_GetLastError( |
- |
|
1110 |
FT_HANDLE ftHandle |
- |
|
1111 |
); |
- |
|
1112 |
|
- |
|
1113 |
FTD2XX_API |
- |
|
1114 |
BOOL WINAPI FT_W32_GetOverlappedResult( |
- |
|
1115 |
FT_HANDLE ftHandle, |
- |
|
1116 |
LPOVERLAPPED lpOverlapped, |
- |
|
1117 |
LPDWORD lpdwBytesTransferred, |
- |
|
1118 |
BOOL bWait |
- |
|
1119 |
); |
- |
|
1120 |
|
- |
|
1121 |
FTD2XX_API |
- |
|
1122 |
BOOL WINAPI FT_W32_CancelIo( |
- |
|
1123 |
FT_HANDLE ftHandle |
- |
|
1124 |
); |
- |
|
1125 |
|
- |
|
1126 |
|
- |
|
1127 |
// |
- |
|
1128 |
// Win32 COMM API type functions |
- |
|
1129 |
// |
- |
|
1130 |
typedef struct _FTCOMSTAT { |
- |
|
1131 |
DWORD fCtsHold : 1; |
- |
|
1132 |
DWORD fDsrHold : 1; |
- |
|
1133 |
DWORD fRlsdHold : 1; |
- |
|
1134 |
DWORD fXoffHold : 1; |
- |
|
1135 |
DWORD fXoffSent : 1; |
- |
|
1136 |
DWORD fEof : 1; |
- |
|
1137 |
DWORD fTxim : 1; |
- |
|
1138 |
DWORD fReserved : 25; |
- |
|
1139 |
DWORD cbInQue; |
- |
|
1140 |
DWORD cbOutQue; |
- |
|
1141 |
} FTCOMSTAT, *LPFTCOMSTAT; |
- |
|
1142 |
|
- |
|
1143 |
typedef struct _FTDCB { |
- |
|
1144 |
DWORD DCBlength; /* sizeof(FTDCB) */ |
- |
|
1145 |
DWORD BaudRate; /* Baudrate at which running */ |
- |
|
1146 |
DWORD fBinary: 1; /* Binary Mode (skip EOF check) */ |
- |
|
1147 |
DWORD fParity: 1; /* Enable parity checking */ |
- |
|
1148 |
DWORD fOutxCtsFlow:1; /* CTS handshaking on output */ |
- |
|
1149 |
DWORD fOutxDsrFlow:1; /* DSR handshaking on output */ |
- |
|
1150 |
DWORD fDtrControl:2; /* DTR Flow control */ |
- |
|
1151 |
DWORD fDsrSensitivity:1; /* DSR Sensitivity */ |
- |
|
1152 |
DWORD fTXContinueOnXoff: 1; /* Continue TX when Xoff sent */ |
- |
|
1153 |
DWORD fOutX: 1; /* Enable output X-ON/X-OFF */ |
- |
|
1154 |
DWORD fInX: 1; /* Enable input X-ON/X-OFF */ |
- |
|
1155 |
DWORD fErrorChar: 1; /* Enable Err Replacement */ |
- |
|
1156 |
DWORD fNull: 1; /* Enable Null stripping */ |
- |
|
1157 |
DWORD fRtsControl:2; /* Rts Flow control */ |
- |
|
1158 |
DWORD fAbortOnError:1; /* Abort all reads and writes on Error */ |
- |
|
1159 |
DWORD fDummy2:17; /* Reserved */ |
- |
|
1160 |
WORD wReserved; /* Not currently used */ |
- |
|
1161 |
WORD XonLim; /* Transmit X-ON threshold */ |
- |
|
1162 |
WORD XoffLim; /* Transmit X-OFF threshold */ |
- |
|
1163 |
BYTE ByteSize; /* Number of bits/byte, 4-8 */ |
- |
|
1164 |
BYTE Parity; /* 0-4=None,Odd,Even,Mark,Space */ |
- |
|
1165 |
BYTE StopBits; /* 0,1,2 = 1, 1.5, 2 */ |
- |
|
1166 |
char XonChar; /* Tx and Rx X-ON character */ |
- |
|
1167 |
char XoffChar; /* Tx and Rx X-OFF character */ |
- |
|
1168 |
char ErrorChar; /* Error replacement char */ |
- |
|
1169 |
char EofChar; /* End of Input character */ |
- |
|
1170 |
char EvtChar; /* Received Event character */ |
- |
|
1171 |
WORD wReserved1; /* Fill for now. */ |
- |
|
1172 |
} FTDCB, *LPFTDCB; |
- |
|
1173 |
|
- |
|
1174 |
typedef struct _FTTIMEOUTS { |
- |
|
1175 |
DWORD ReadIntervalTimeout; /* Maximum time between read chars. */ |
- |
|
1176 |
DWORD ReadTotalTimeoutMultiplier; /* Multiplier of characters. */ |
- |
|
1177 |
DWORD ReadTotalTimeoutConstant; /* Constant in milliseconds. */ |
- |
|
1178 |
DWORD WriteTotalTimeoutMultiplier; /* Multiplier of characters. */ |
- |
|
1179 |
DWORD WriteTotalTimeoutConstant; /* Constant in milliseconds. */ |
- |
|
1180 |
} FTTIMEOUTS,*LPFTTIMEOUTS; |
- |
|
1181 |
|
- |
|
1182 |
|
- |
|
1183 |
FTD2XX_API |
- |
|
1184 |
BOOL WINAPI FT_W32_ClearCommBreak( |
- |
|
1185 |
FT_HANDLE ftHandle |
- |
|
1186 |
); |
- |
|
1187 |
|
- |
|
1188 |
FTD2XX_API |
- |
|
1189 |
BOOL WINAPI FT_W32_ClearCommError( |
- |
|
1190 |
FT_HANDLE ftHandle, |
- |
|
1191 |
LPDWORD lpdwErrors, |
- |
|
1192 |
LPFTCOMSTAT lpftComstat |
- |
|
1193 |
); |
- |
|
1194 |
|
- |
|
1195 |
FTD2XX_API |
- |
|
1196 |
BOOL WINAPI FT_W32_EscapeCommFunction( |
- |
|
1197 |
FT_HANDLE ftHandle, |
- |
|
1198 |
DWORD dwFunc |
- |
|
1199 |
); |
- |
|
1200 |
|
- |
|
1201 |
FTD2XX_API |
- |
|
1202 |
BOOL WINAPI FT_W32_GetCommModemStatus( |
- |
|
1203 |
FT_HANDLE ftHandle, |
- |
|
1204 |
LPDWORD lpdwModemStatus |
- |
|
1205 |
); |
- |
|
1206 |
|
- |
|
1207 |
FTD2XX_API |
- |
|
1208 |
BOOL WINAPI FT_W32_GetCommState( |
- |
|
1209 |
FT_HANDLE ftHandle, |
- |
|
1210 |
LPFTDCB lpftDcb |
- |
|
1211 |
); |
- |
|
1212 |
|
- |
|
1213 |
FTD2XX_API |
- |
|
1214 |
BOOL WINAPI FT_W32_GetCommTimeouts( |
- |
|
1215 |
FT_HANDLE ftHandle, |
- |
|
1216 |
FTTIMEOUTS *pTimeouts |
- |
|
1217 |
); |
- |
|
1218 |
|
- |
|
1219 |
FTD2XX_API |
- |
|
1220 |
BOOL WINAPI FT_W32_PurgeComm( |
- |
|
1221 |
FT_HANDLE ftHandle, |
- |
|
1222 |
DWORD dwMask |
- |
|
1223 |
); |
- |
|
1224 |
|
- |
|
1225 |
FTD2XX_API |
- |
|
1226 |
BOOL WINAPI FT_W32_SetCommBreak( |
- |
|
1227 |
FT_HANDLE ftHandle |
- |
|
1228 |
); |
- |
|
1229 |
|
- |
|
1230 |
FTD2XX_API |
- |
|
1231 |
BOOL WINAPI FT_W32_SetCommMask( |
- |
|
1232 |
FT_HANDLE ftHandle, |
- |
|
1233 |
ULONG ulEventMask |
- |
|
1234 |
); |
- |
|
1235 |
|
- |
|
1236 |
FTD2XX_API |
- |
|
1237 |
BOOL WINAPI FT_W32_GetCommMask( |
- |
|
1238 |
FT_HANDLE ftHandle, |
- |
|
1239 |
LPDWORD lpdwEventMask |
- |
|
1240 |
); |
- |
|
1241 |
|
- |
|
1242 |
FTD2XX_API |
- |
|
1243 |
BOOL WINAPI FT_W32_SetCommState( |
- |
|
1244 |
FT_HANDLE ftHandle, |
- |
|
1245 |
LPFTDCB lpftDcb |
- |
|
1246 |
); |
- |
|
1247 |
|
- |
|
1248 |
FTD2XX_API |
- |
|
1249 |
BOOL WINAPI FT_W32_SetCommTimeouts( |
- |
|
1250 |
FT_HANDLE ftHandle, |
- |
|
1251 |
FTTIMEOUTS *pTimeouts |
- |
|
1252 |
); |
- |
|
1253 |
|
- |
|
1254 |
FTD2XX_API |
- |
|
1255 |
BOOL WINAPI FT_W32_SetupComm( |
- |
|
1256 |
FT_HANDLE ftHandle, |
- |
|
1257 |
DWORD dwReadBufferSize, |
- |
|
1258 |
DWORD dwWriteBufferSize |
- |
|
1259 |
); |
- |
|
1260 |
|
- |
|
1261 |
FTD2XX_API |
- |
|
1262 |
BOOL WINAPI FT_W32_WaitCommEvent( |
- |
|
1263 |
FT_HANDLE ftHandle, |
- |
|
1264 |
PULONG pulEvent, |
- |
|
1265 |
LPOVERLAPPED lpOverlapped |
- |
|
1266 |
); |
- |
|
1267 |
|
- |
|
1268 |
|
- |
|
1269 |
// |
- |
|
1270 |
// Device information |
- |
|
1271 |
// |
- |
|
1272 |
|
- |
|
1273 |
typedef struct _ft_device_list_info_node { |
- |
|
1274 |
ULONG Flags; |
- |
|
1275 |
ULONG Type; |
- |
|
1276 |
ULONG ID; |
- |
|
1277 |
DWORD LocId; |
- |
|
1278 |
char SerialNumber[16]; |
- |
|
1279 |
char Description[64]; |
- |
|
1280 |
FT_HANDLE ftHandle; |
- |
|
1281 |
} FT_DEVICE_LIST_INFO_NODE; |
- |
|
1282 |
|
- |
|
1283 |
// Device information flags |
- |
|
1284 |
enum { |
- |
|
1285 |
FT_FLAGS_OPENED = 1, |
- |
|
1286 |
FT_FLAGS_HISPEED = 2 |
- |
|
1287 |
}; |
- |
|
1288 |
|
- |
|
1289 |
|
- |
|
1290 |
FTD2XX_API |
- |
|
1291 |
FT_STATUS WINAPI FT_CreateDeviceInfoList( |
- |
|
1292 |
LPDWORD lpdwNumDevs |
- |
|
1293 |
); |
- |
|
1294 |
|
- |
|
1295 |
FTD2XX_API |
- |
|
1296 |
FT_STATUS WINAPI FT_GetDeviceInfoList( |
- |
|
1297 |
FT_DEVICE_LIST_INFO_NODE *pDest, |
- |
|
1298 |
LPDWORD lpdwNumDevs |
- |
|
1299 |
); |
- |
|
1300 |
|
- |
|
1301 |
FTD2XX_API |
- |
|
1302 |
FT_STATUS WINAPI FT_GetDeviceInfoDetail( |
- |
|
1303 |
DWORD dwIndex, |
- |
|
1304 |
LPDWORD lpdwFlags, |
- |
|
1305 |
LPDWORD lpdwType, |
- |
|
1306 |
LPDWORD lpdwID, |
- |
|
1307 |
LPDWORD lpdwLocId, |
- |
|
1308 |
LPVOID lpSerialNumber, |
- |
|
1309 |
LPVOID lpDescription, |
- |
|
1310 |
FT_HANDLE *pftHandle |
- |
|
1311 |
); |
- |
|
1312 |
|
- |
|
1313 |
|
- |
|
1314 |
// |
- |
|
1315 |
// Version information |
- |
|
1316 |
// |
- |
|
1317 |
|
- |
|
1318 |
FTD2XX_API |
- |
|
1319 |
FT_STATUS WINAPI FT_GetDriverVersion( |
- |
|
1320 |
FT_HANDLE ftHandle, |
- |
|
1321 |
LPDWORD lpdwVersion |
- |
|
1322 |
); |
- |
|
1323 |
|
- |
|
1324 |
FTD2XX_API |
- |
|
1325 |
FT_STATUS WINAPI FT_GetLibraryVersion( |
- |
|
1326 |
LPDWORD lpdwVersion |
- |
|
1327 |
); |
- |
|
1328 |
|
- |
|
1329 |
|
- |
|
1330 |
FTD2XX_API |
- |
|
1331 |
FT_STATUS WINAPI FT_Rescan( |
- |
|
1332 |
void |
- |
|
1333 |
); |
- |
|
1334 |
|
- |
|
1335 |
FTD2XX_API |
- |
|
1336 |
FT_STATUS WINAPI FT_Reload( |
- |
|
1337 |
WORD wVid, |
- |
|
1338 |
WORD wPid |
- |
|
1339 |
); |
- |
|
1340 |
|
- |
|
1341 |
FTD2XX_API |
- |
|
1342 |
FT_STATUS WINAPI FT_GetComPortNumber( |
- |
|
1343 |
FT_HANDLE ftHandle, |
- |
|
1344 |
LPLONG lpdwComPortNumber |
- |
|
1345 |
); |
- |
|
1346 |
|
- |
|
1347 |
|
- |
|
1348 |
// |
- |
|
1349 |
// FT232H additional EEPROM functions |
- |
|
1350 |
// |
- |
|
1351 |
|
- |
|
1352 |
FTD2XX_API |
- |
|
1353 |
FT_STATUS WINAPI FT_EE_ReadConfig( |
- |
|
1354 |
FT_HANDLE ftHandle, |
- |
|
1355 |
UCHAR ucAddress, |
- |
|
1356 |
PUCHAR pucValue |
- |
|
1357 |
); |
- |
|
1358 |
|
- |
|
1359 |
FTD2XX_API |
- |
|
1360 |
FT_STATUS WINAPI FT_EE_WriteConfig( |
- |
|
1361 |
FT_HANDLE ftHandle, |
- |
|
1362 |
UCHAR ucAddress, |
- |
|
1363 |
UCHAR ucValue |
- |
|
1364 |
); |
- |
|
1365 |
|
- |
|
1366 |
FTD2XX_API |
- |
|
1367 |
FT_STATUS WINAPI FT_EE_ReadECC( |
- |
|
1368 |
FT_HANDLE ftHandle, |
- |
|
1369 |
UCHAR ucOption, |
- |
|
1370 |
LPWORD lpwValue |
- |
|
1371 |
); |
- |
|
1372 |
|
- |
|
1373 |
FTD2XX_API |
- |
|
1374 |
FT_STATUS WINAPI FT_GetQueueStatusEx( |
- |
|
1375 |
FT_HANDLE ftHandle, |
- |
|
1376 |
DWORD *dwRxBytes |
- |
|
1377 |
); |
- |
|
1378 |
|
- |
|
1379 |
FTD2XX_API |
- |
|
1380 |
FT_STATUS WINAPI FT_ComPortIdle( |
- |
|
1381 |
FT_HANDLE ftHandle |
- |
|
1382 |
); |
- |
|
1383 |
|
- |
|
1384 |
FTD2XX_API |
- |
|
1385 |
FT_STATUS WINAPI FT_ComPortCancelIdle( |
- |
|
1386 |
FT_HANDLE ftHandle |
- |
|
1387 |
); |
- |
|
1388 |
|
- |
|
1389 |
FTD2XX_API |
- |
|
1390 |
FT_STATUS WINAPI FT_VendorCmdGet( |
- |
|
1391 |
FT_HANDLE ftHandle, |
- |
|
1392 |
UCHAR Request, |
- |
|
1393 |
UCHAR *Buf, |
- |
|
1394 |
USHORT Len |
- |
|
1395 |
); |
- |
|
1396 |
|
- |
|
1397 |
FTD2XX_API |
- |
|
1398 |
FT_STATUS WINAPI FT_VendorCmdSet( |
- |
|
1399 |
FT_HANDLE ftHandle, |
- |
|
1400 |
UCHAR Request, |
- |
|
1401 |
UCHAR *Buf, |
- |
|
1402 |
USHORT Len |
- |
|
1403 |
); |
- |
|
1404 |
|
- |
|
1405 |
FTD2XX_API |
- |
|
1406 |
FT_STATUS WINAPI FT_VendorCmdGetEx( |
- |
|
1407 |
FT_HANDLE ftHandle, |
- |
|
1408 |
USHORT wValue, |
- |
|
1409 |
UCHAR *Buf, |
- |
|
1410 |
USHORT Len |
- |
|
1411 |
); |
- |
|
1412 |
|
- |
|
1413 |
FTD2XX_API |
- |
|
1414 |
FT_STATUS WINAPI FT_VendorCmdSetEx( |
- |
|
1415 |
FT_HANDLE ftHandle, |
- |
|
1416 |
USHORT wValue, |
- |
|
1417 |
UCHAR *Buf, |
- |
|
1418 |
USHORT Len |
- |
|
1419 |
); |
- |
|
1420 |
|
- |
|
1421 |
#ifdef __cplusplus |
- |
|
1422 |
} |
- |
|
1423 |
#endif |
- |
|
1424 |
|
- |
|
1425 |
|
- |
|
1426 |
#endif /* FTD2XX_H */ |
- |
|
1427 |
|