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