OpenCores
URL https://opencores.org/ocsvn/z80control/z80control/trunk

Subversion Repositories z80control

[/] [z80control/] [trunk/] [CII_Starter_USB_API_v1/] [SW/] [FTD2XX.H] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 tylerapohl
/*++
2
 
3
Copyright (c) 2001-2004  Future Technology Devices International Ltd.
4
 
5
Module Name:
6
 
7
    ftd2xx.h
8
 
9
Abstract:
10
 
11
    Native USB device driver for FTDI FT8U232/245
12
    FTD2XX library definitions
13
 
14
Environment:
15
 
16
    kernel & user mode
17
 
18
Revision History:
19
 
20
    13/03/01    awm     Created.
21
        13/01/03        awm             Added device information support.
22
        19/03/03        awm             Added FT_W32_CancelIo.
23
        12/06/03        awm             Added FT_StopInTask and FT_RestartInTask.
24
        18/09/03        awm             Added FT_SetResetPipeRetryCount.
25
        10/10/03        awm             Added FT_ResetPort.
26
        23/01/04        awm             Added support for open-by-location.
27
        16/03/04        awm             Added support for FT2232C.
28
 
29
 
30
--*/
31
 
32
 
33
#ifndef FTD2XX_H
34
#define FTD2XX_H
35
 
36
// The following ifdef block is the standard way of creating macros
37
// which make exporting from a DLL simpler.  All files within this DLL
38
// are compiled with the FTD2XX_EXPORTS symbol defined on the command line.
39
// This symbol should not be defined on any project that uses this DLL.
40
// This way any other project whose source files include this file see
41
// FTD2XX_API functions as being imported from a DLL, whereas this DLL
42
// sees symbols defined with this macro as being exported.
43
 
44
#ifdef FTD2XX_EXPORTS
45
#define FTD2XX_API __declspec(dllexport)
46
#else
47
#define FTD2XX_API __declspec(dllimport)
48
#endif
49
 
50
 
51
typedef PVOID   FT_HANDLE;
52
typedef ULONG   FT_STATUS;
53
 
54
//
55
// Device status
56
//
57
enum {
58
    FT_OK,
59
    FT_INVALID_HANDLE,
60
    FT_DEVICE_NOT_FOUND,
61
    FT_DEVICE_NOT_OPENED,
62
    FT_IO_ERROR,
63
    FT_INSUFFICIENT_RESOURCES,
64
    FT_INVALID_PARAMETER,
65
    FT_INVALID_BAUD_RATE,
66
 
67
    FT_DEVICE_NOT_OPENED_FOR_ERASE,
68
    FT_DEVICE_NOT_OPENED_FOR_WRITE,
69
    FT_FAILED_TO_WRITE_DEVICE,
70
    FT_EEPROM_READ_FAILED,
71
    FT_EEPROM_WRITE_FAILED,
72
    FT_EEPROM_ERASE_FAILED,
73
        FT_EEPROM_NOT_PRESENT,
74
        FT_EEPROM_NOT_PROGRAMMED,
75
        FT_INVALID_ARGS,
76
        FT_NOT_SUPPORTED,
77
        FT_OTHER_ERROR
78
};
79
 
80
 
81
#define FT_SUCCESS(status) ((status) == FT_OK)
82
 
83
//
84
// FT_OpenEx Flags
85
//
86
 
87
#define FT_OPEN_BY_SERIAL_NUMBER    1
88
#define FT_OPEN_BY_DESCRIPTION      2
89
#define FT_OPEN_BY_LOCATION                     4
90
 
91
//
92
// FT_ListDevices Flags (used in conjunction with FT_OpenEx Flags
93
//
94
 
95
#define FT_LIST_NUMBER_ONLY                     0x80000000
96
#define FT_LIST_BY_INDEX                        0x40000000
97
#define FT_LIST_ALL                                     0x20000000
98
 
99
#define FT_LIST_MASK (FT_LIST_NUMBER_ONLY|FT_LIST_BY_INDEX|FT_LIST_ALL)
100
 
101
//
102
// Baud Rates
103
//
104
 
105
#define FT_BAUD_300                     300
106
#define FT_BAUD_600                     600
107
#define FT_BAUD_1200            1200
108
#define FT_BAUD_2400            2400
109
#define FT_BAUD_4800            4800
110
#define FT_BAUD_9600            9600
111
#define FT_BAUD_14400           14400
112
#define FT_BAUD_19200           19200
113
#define FT_BAUD_38400           38400
114
#define FT_BAUD_57600           57600
115
#define FT_BAUD_115200          115200
116
#define FT_BAUD_230400          230400
117
#define FT_BAUD_460800          460800
118
#define FT_BAUD_921600          921600
119
 
120
//
121
// Word Lengths
122
//
123
 
124
#define FT_BITS_8                       (UCHAR) 8
125
#define FT_BITS_7                       (UCHAR) 7
126
#define FT_BITS_6                       (UCHAR) 6
127
#define FT_BITS_5                       (UCHAR) 5
128
 
129
//
130
// Stop Bits
131
//
132
 
133
#define FT_STOP_BITS_1          (UCHAR) 0
134
#define FT_STOP_BITS_1_5        (UCHAR) 1
135
#define FT_STOP_BITS_2          (UCHAR) 2
136
 
137
//
138
// Parity
139
//
140
 
141
#define FT_PARITY_NONE          (UCHAR) 0
142
#define FT_PARITY_ODD           (UCHAR) 1
143
#define FT_PARITY_EVEN          (UCHAR) 2
144
#define FT_PARITY_MARK          (UCHAR) 3
145
#define FT_PARITY_SPACE         (UCHAR) 4
146
 
147
//
148
// Flow Control
149
//
150
 
151
#define FT_FLOW_NONE        0x0000
152
#define FT_FLOW_RTS_CTS     0x0100
153
#define FT_FLOW_DTR_DSR     0x0200
154
#define FT_FLOW_XON_XOFF    0x0400
155
 
156
//
157
// Purge rx and tx buffers
158
//
159
#define FT_PURGE_RX         1
160
#define FT_PURGE_TX         2
161
 
162
//
163
// Events
164
//
165
 
166
typedef void (*PFT_EVENT_HANDLER)(DWORD,DWORD);
167
 
168
#define FT_EVENT_RXCHAR             1
169
#define FT_EVENT_MODEM_STATUS   2
170
 
171
//
172
// Timeouts
173
//
174
 
175
#define FT_DEFAULT_RX_TIMEOUT   300
176
#define FT_DEFAULT_TX_TIMEOUT   300
177
 
178
//
179
// Device types
180
//
181
 
182
typedef ULONG   FT_DEVICE;
183
 
184
enum {
185
    FT_DEVICE_BM,
186
    FT_DEVICE_AM,
187
    FT_DEVICE_100AX,
188
    FT_DEVICE_UNKNOWN,
189
    FT_DEVICE_2232C
190
};
191
 
192
 
193
#ifdef __cplusplus
194
extern "C" {
195
#endif
196
 
197
 
198
FTD2XX_API
199
FT_STATUS WINAPI FT_Open(
200
        int deviceNumber,
201
        FT_HANDLE *pHandle
202
        );
203
 
204
FTD2XX_API
205
FT_STATUS WINAPI FT_OpenEx(
206
    PVOID pArg1,
207
    DWORD Flags,
208
    FT_HANDLE *pHandle
209
    );
210
 
211
FTD2XX_API
212
FT_STATUS WINAPI FT_ListDevices(
213
        PVOID pArg1,
214
        PVOID pArg2,
215
        DWORD Flags
216
        );
217
 
218
FTD2XX_API
219
FT_STATUS WINAPI FT_Close(
220
    FT_HANDLE ftHandle
221
    );
222
 
223
FTD2XX_API
224
FT_STATUS WINAPI FT_Read(
225
    FT_HANDLE ftHandle,
226
    LPVOID lpBuffer,
227
    DWORD nBufferSize,
228
    LPDWORD lpBytesReturned
229
    );
230
 
231
FTD2XX_API
232
FT_STATUS WINAPI FT_Write(
233
    FT_HANDLE ftHandle,
234
    LPVOID lpBuffer,
235
    DWORD nBufferSize,
236
    LPDWORD lpBytesWritten
237
    );
238
 
239
FTD2XX_API
240
FT_STATUS WINAPI FT_IoCtl(
241
    FT_HANDLE ftHandle,
242
    DWORD dwIoControlCode,
243
    LPVOID lpInBuf,
244
    DWORD nInBufSize,
245
    LPVOID lpOutBuf,
246
    DWORD nOutBufSize,
247
    LPDWORD lpBytesReturned,
248
    LPOVERLAPPED lpOverlapped
249
    );
250
 
251
FTD2XX_API
252
FT_STATUS WINAPI FT_SetBaudRate(
253
    FT_HANDLE ftHandle,
254
        ULONG BaudRate
255
        );
256
 
257
FTD2XX_API
258
FT_STATUS WINAPI FT_SetDivisor(
259
    FT_HANDLE ftHandle,
260
        USHORT Divisor
261
        );
262
 
263
FTD2XX_API
264
FT_STATUS WINAPI FT_SetDataCharacteristics(
265
    FT_HANDLE ftHandle,
266
        UCHAR WordLength,
267
        UCHAR StopBits,
268
        UCHAR Parity
269
        );
270
 
271
FTD2XX_API
272
FT_STATUS WINAPI FT_SetFlowControl(
273
    FT_HANDLE ftHandle,
274
    USHORT FlowControl,
275
    UCHAR XonChar,
276
    UCHAR XoffChar
277
        );
278
 
279
FTD2XX_API
280
FT_STATUS WINAPI FT_ResetDevice(
281
    FT_HANDLE ftHandle
282
        );
283
 
284
FTD2XX_API
285
FT_STATUS WINAPI FT_SetDtr(
286
    FT_HANDLE ftHandle
287
        );
288
 
289
FTD2XX_API
290
FT_STATUS WINAPI FT_ClrDtr(
291
    FT_HANDLE ftHandle
292
        );
293
 
294
FTD2XX_API
295
FT_STATUS WINAPI FT_SetRts(
296
    FT_HANDLE ftHandle
297
        );
298
 
299
FTD2XX_API
300
FT_STATUS WINAPI FT_ClrRts(
301
    FT_HANDLE ftHandle
302
        );
303
 
304
FTD2XX_API
305
FT_STATUS WINAPI FT_GetModemStatus(
306
    FT_HANDLE ftHandle,
307
        ULONG *pModemStatus
308
        );
309
 
310
FTD2XX_API
311
FT_STATUS WINAPI FT_SetChars(
312
    FT_HANDLE ftHandle,
313
        UCHAR EventChar,
314
        UCHAR EventCharEnabled,
315
        UCHAR ErrorChar,
316
        UCHAR ErrorCharEnabled
317
    );
318
 
319
FTD2XX_API
320
FT_STATUS WINAPI FT_Purge(
321
    FT_HANDLE ftHandle,
322
        ULONG Mask
323
        );
324
 
325
FTD2XX_API
326
FT_STATUS WINAPI FT_SetTimeouts(
327
    FT_HANDLE ftHandle,
328
        ULONG ReadTimeout,
329
        ULONG WriteTimeout
330
        );
331
 
332
FTD2XX_API
333
FT_STATUS WINAPI FT_GetQueueStatus(
334
    FT_HANDLE ftHandle,
335
        DWORD *dwRxBytes
336
        );
337
 
338
FTD2XX_API
339
FT_STATUS WINAPI FT_SetEventNotification(
340
    FT_HANDLE ftHandle,
341
        DWORD Mask,
342
        PVOID Param
343
        );
344
 
345
FTD2XX_API
346
FT_STATUS WINAPI FT_GetStatus(
347
    FT_HANDLE ftHandle,
348
    DWORD *dwRxBytes,
349
    DWORD *dwTxBytes,
350
    DWORD *dwEventDWord
351
        );
352
 
353
FTD2XX_API
354
FT_STATUS WINAPI FT_SetBreakOn(
355
    FT_HANDLE ftHandle
356
    );
357
 
358
FTD2XX_API
359
FT_STATUS WINAPI FT_SetBreakOff(
360
    FT_HANDLE ftHandle
361
    );
362
 
363
FTD2XX_API
364
FT_STATUS WINAPI FT_SetWaitMask(
365
    FT_HANDLE ftHandle,
366
    DWORD Mask
367
    );
368
 
369
FTD2XX_API
370
FT_STATUS WINAPI FT_WaitOnMask(
371
    FT_HANDLE ftHandle,
372
    DWORD *Mask
373
    );
374
 
375
FTD2XX_API
376
FT_STATUS WINAPI FT_GetEventStatus(
377
    FT_HANDLE ftHandle,
378
    DWORD *dwEventDWord
379
    );
380
 
381
FTD2XX_API
382
FT_STATUS WINAPI FT_ReadEE(
383
    FT_HANDLE ftHandle,
384
        DWORD dwWordOffset,
385
    LPWORD lpwValue
386
        );
387
 
388
FTD2XX_API
389
FT_STATUS WINAPI FT_WriteEE(
390
    FT_HANDLE ftHandle,
391
        DWORD dwWordOffset,
392
    WORD wValue
393
        );
394
 
395
FTD2XX_API
396
FT_STATUS WINAPI FT_EraseEE(
397
    FT_HANDLE ftHandle
398
        );
399
 
400
//
401
// structure to hold program data for FT_Program function
402
//
403
typedef struct ft_program_data {
404
 
405
        DWORD Signature1;                       // Header - must be 0x00000000
406
        DWORD Signature2;                       // Header - must be 0xffffffff
407
        DWORD Version;                          // Header - FT_PROGRAM_DATA version
408
                                                                //          0 = original
409
                                    //          1 = FT2232C extensions
410
 
411
        WORD VendorId;                          // 0x0403
412
        WORD ProductId;                         // 0x6001
413
        char *Manufacturer;                     // "FTDI"
414
        char *ManufacturerId;           // "FT"
415
        char *Description;                      // "USB HS Serial Converter"
416
        char *SerialNumber;                     // "FT000001" if fixed, or NULL
417
        WORD MaxPower;                          // 0 < MaxPower <= 500
418
        WORD PnP;                                       // 0 = disabled, 1 = enabled
419
        WORD SelfPowered;                       // 0 = bus powered, 1 = self powered
420
        WORD RemoteWakeup;                      // 0 = not capable, 1 = capable
421
        //
422
        // Rev4 extensions
423
        //
424
        UCHAR Rev4;                                     // non-zero if Rev4 chip, zero otherwise
425
        UCHAR IsoIn;                            // non-zero if in endpoint is isochronous
426
        UCHAR IsoOut;                           // non-zero if out endpoint is isochronous
427
        UCHAR PullDownEnable;           // non-zero if pull down enabled
428
        UCHAR SerNumEnable;                     // non-zero if serial number to be used
429
        UCHAR USBVersionEnable;         // non-zero if chip uses USBVersion
430
        WORD USBVersion;                        // BCD (0x0200 => USB2)
431
        //
432
        // FT2232C extensions
433
        //
434
        UCHAR Rev5;                                     // non-zero if Rev5 chip, zero otherwise
435
        UCHAR IsoInA;                           // non-zero if in endpoint is isochronous
436
        UCHAR IsoInB;                           // non-zero if in endpoint is isochronous
437
        UCHAR IsoOutA;                          // non-zero if out endpoint is isochronous
438
        UCHAR IsoOutB;                          // non-zero if out endpoint is isochronous
439
        UCHAR PullDownEnable5;          // non-zero if pull down enabled
440
        UCHAR SerNumEnable5;            // non-zero if serial number to be used
441
        UCHAR USBVersionEnable5;        // non-zero if chip uses USBVersion
442
        WORD USBVersion5;                       // BCD (0x0200 => USB2)
443
        UCHAR AIsHighCurrent;           // non-zero if interface is high current
444
        UCHAR BIsHighCurrent;           // non-zero if interface is high current
445
        UCHAR IFAIsFifo;                        // non-zero if interface is 245 FIFO
446
        UCHAR IFAIsFifoTar;                     // non-zero if interface is 245 FIFO CPU target
447
        UCHAR IFAIsFastSer;                     // non-zero if interface is Fast serial
448
        UCHAR AIsVCP;                           // non-zero if interface is to use VCP drivers
449
        UCHAR IFBIsFifo;                        // non-zero if interface is 245 FIFO
450
        UCHAR IFBIsFifoTar;                     // non-zero if interface is 245 FIFO CPU target
451
        UCHAR IFBIsFastSer;                     // non-zero if interface is Fast serial
452
        UCHAR BIsVCP;                           // non-zero if interface is to use VCP drivers
453
} FT_PROGRAM_DATA, *PFT_PROGRAM_DATA;
454
 
455
FTD2XX_API
456
FT_STATUS WINAPI FT_EE_Program(
457
    FT_HANDLE ftHandle,
458
        PFT_PROGRAM_DATA pData
459
        );
460
 
461
FTD2XX_API
462
FT_STATUS WINAPI FT_EE_ProgramEx(
463
    FT_HANDLE ftHandle,
464
        PFT_PROGRAM_DATA pData,
465
        char *Manufacturer,
466
        char *ManufacturerId,
467
        char *Description,
468
        char *SerialNumber
469
        );
470
 
471
FTD2XX_API
472
FT_STATUS WINAPI FT_EE_Read(
473
    FT_HANDLE ftHandle,
474
        PFT_PROGRAM_DATA pData
475
        );
476
 
477
FTD2XX_API
478
FT_STATUS WINAPI FT_EE_ReadEx(
479
    FT_HANDLE ftHandle,
480
        PFT_PROGRAM_DATA pData,
481
        char *Manufacturer,
482
        char *ManufacturerId,
483
        char *Description,
484
        char *SerialNumber
485
        );
486
 
487
FTD2XX_API
488
FT_STATUS WINAPI FT_EE_UASize(
489
    FT_HANDLE ftHandle,
490
        LPDWORD lpdwSize
491
        );
492
 
493
FTD2XX_API
494
FT_STATUS WINAPI FT_EE_UAWrite(
495
    FT_HANDLE ftHandle,
496
        PUCHAR pucData,
497
        DWORD dwDataLen
498
        );
499
 
500
FTD2XX_API
501
FT_STATUS WINAPI FT_EE_UARead(
502
    FT_HANDLE ftHandle,
503
        PUCHAR pucData,
504
        DWORD dwDataLen,
505
        LPDWORD lpdwBytesRead
506
        );
507
 
508
FTD2XX_API
509
FT_STATUS WINAPI FT_SetLatencyTimer(
510
    FT_HANDLE ftHandle,
511
    UCHAR ucLatency
512
    );
513
 
514
FTD2XX_API
515
FT_STATUS WINAPI FT_GetLatencyTimer(
516
    FT_HANDLE ftHandle,
517
    PUCHAR pucLatency
518
    );
519
 
520
FTD2XX_API
521
FT_STATUS WINAPI FT_SetBitMode(
522
    FT_HANDLE ftHandle,
523
    UCHAR ucMask,
524
        UCHAR ucEnable
525
    );
526
 
527
FTD2XX_API
528
FT_STATUS WINAPI FT_GetBitMode(
529
    FT_HANDLE ftHandle,
530
    PUCHAR pucMode
531
    );
532
 
533
FTD2XX_API
534
FT_STATUS WINAPI FT_SetUSBParameters(
535
    FT_HANDLE ftHandle,
536
    ULONG ulInTransferSize,
537
    ULONG ulOutTransferSize
538
    );
539
 
540
FTD2XX_API
541
FT_STATUS WINAPI FT_GetDeviceInfo(
542
    FT_HANDLE ftHandle,
543
    FT_DEVICE *lpftDevice,
544
        LPDWORD lpdwID,
545
        PCHAR SerialNumber,
546
        PCHAR Description,
547
        LPVOID Dummy
548
    );
549
 
550
FTD2XX_API
551
FT_STATUS WINAPI FT_StopInTask(
552
    FT_HANDLE ftHandle
553
    );
554
 
555
FTD2XX_API
556
FT_STATUS WINAPI FT_RestartInTask(
557
    FT_HANDLE ftHandle
558
    );
559
 
560
FTD2XX_API
561
FT_STATUS WINAPI FT_SetResetPipeRetryCount(
562
    FT_HANDLE ftHandle,
563
        DWORD dwCount
564
    );
565
 
566
FTD2XX_API
567
FT_STATUS WINAPI FT_ResetPort(
568
    FT_HANDLE ftHandle
569
    );
570
 
571
 
572
//
573
// Win32-type functions
574
//
575
 
576
FTD2XX_API
577
FT_HANDLE WINAPI FT_W32_CreateFile(
578
        LPCSTR                                  lpszName,
579
        DWORD                                   dwAccess,
580
        DWORD                                   dwShareMode,
581
        LPSECURITY_ATTRIBUTES   lpSecurityAttributes,
582
        DWORD                                   dwCreate,
583
        DWORD                                   dwAttrsAndFlags,
584
        HANDLE                                  hTemplate
585
        );
586
 
587
FTD2XX_API
588
BOOL WINAPI FT_W32_CloseHandle(
589
    FT_HANDLE ftHandle
590
        );
591
 
592
FTD2XX_API
593
BOOL WINAPI FT_W32_ReadFile(
594
    FT_HANDLE ftHandle,
595
    LPVOID lpBuffer,
596
    DWORD nBufferSize,
597
    LPDWORD lpBytesReturned,
598
        LPOVERLAPPED lpOverlapped
599
    );
600
 
601
FTD2XX_API
602
BOOL WINAPI FT_W32_WriteFile(
603
    FT_HANDLE ftHandle,
604
    LPVOID lpBuffer,
605
    DWORD nBufferSize,
606
    LPDWORD lpBytesWritten,
607
        LPOVERLAPPED lpOverlapped
608
    );
609
 
610
FTD2XX_API
611
DWORD WINAPI FT_W32_GetLastError(
612
    FT_HANDLE ftHandle
613
    );
614
 
615
FTD2XX_API
616
BOOL WINAPI FT_W32_GetOverlappedResult(
617
    FT_HANDLE ftHandle,
618
        LPOVERLAPPED lpOverlapped,
619
    LPDWORD lpdwBytesTransferred,
620
        BOOL bWait
621
    );
622
 
623
FTD2XX_API
624
BOOL WINAPI FT_W32_CancelIo(
625
    FT_HANDLE ftHandle
626
    );
627
 
628
 
629
//
630
// Win32 COMM API type functions
631
//
632
typedef struct _FTCOMSTAT {
633
    DWORD fCtsHold : 1;
634
    DWORD fDsrHold : 1;
635
    DWORD fRlsdHold : 1;
636
    DWORD fXoffHold : 1;
637
    DWORD fXoffSent : 1;
638
    DWORD fEof : 1;
639
    DWORD fTxim : 1;
640
    DWORD fReserved : 25;
641
    DWORD cbInQue;
642
    DWORD cbOutQue;
643
} FTCOMSTAT, *LPFTCOMSTAT;
644
 
645
typedef struct _FTDCB {
646
    DWORD DCBlength;      /* sizeof(FTDCB)                   */
647
    DWORD BaudRate;       /* Baudrate at which running       */
648
    DWORD fBinary: 1;     /* Binary Mode (skip EOF check)    */
649
    DWORD fParity: 1;     /* Enable parity checking          */
650
    DWORD fOutxCtsFlow:1; /* CTS handshaking on output       */
651
    DWORD fOutxDsrFlow:1; /* DSR handshaking on output       */
652
    DWORD fDtrControl:2;  /* DTR Flow control                */
653
    DWORD fDsrSensitivity:1; /* DSR Sensitivity              */
654
    DWORD fTXContinueOnXoff: 1; /* Continue TX when Xoff sent */
655
    DWORD fOutX: 1;       /* Enable output X-ON/X-OFF        */
656
    DWORD fInX: 1;        /* Enable input X-ON/X-OFF         */
657
    DWORD fErrorChar: 1;  /* Enable Err Replacement          */
658
    DWORD fNull: 1;       /* Enable Null stripping           */
659
    DWORD fRtsControl:2;  /* Rts Flow control                */
660
    DWORD fAbortOnError:1; /* Abort all reads and writes on Error */
661
    DWORD fDummy2:17;     /* Reserved                        */
662
    WORD wReserved;       /* Not currently used              */
663
    WORD XonLim;          /* Transmit X-ON threshold         */
664
    WORD XoffLim;         /* Transmit X-OFF threshold        */
665
    BYTE ByteSize;        /* Number of bits/byte, 4-8        */
666
    BYTE Parity;          /* 0-4=None,Odd,Even,Mark,Space    */
667
    BYTE StopBits;        /* 0,1,2 = 1, 1.5, 2               */
668
    char XonChar;         /* Tx and Rx X-ON character        */
669
    char XoffChar;        /* Tx and Rx X-OFF character       */
670
    char ErrorChar;       /* Error replacement char          */
671
    char EofChar;         /* End of Input character          */
672
    char EvtChar;         /* Received Event character        */
673
    WORD wReserved1;      /* Fill for now.                   */
674
} FTDCB, *LPFTDCB;
675
 
676
typedef struct _FTTIMEOUTS {
677
    DWORD ReadIntervalTimeout;          /* Maximum time between read chars. */
678
    DWORD ReadTotalTimeoutMultiplier;   /* Multiplier of characters.        */
679
    DWORD ReadTotalTimeoutConstant;     /* Constant in milliseconds.        */
680
    DWORD WriteTotalTimeoutMultiplier;  /* Multiplier of characters.        */
681
    DWORD WriteTotalTimeoutConstant;    /* Constant in milliseconds.        */
682
} FTTIMEOUTS,*LPFTTIMEOUTS;
683
 
684
 
685
FTD2XX_API
686
BOOL WINAPI FT_W32_ClearCommBreak(
687
    FT_HANDLE ftHandle
688
        );
689
 
690
FTD2XX_API
691
BOOL WINAPI FT_W32_ClearCommError(
692
    FT_HANDLE ftHandle,
693
        LPDWORD lpdwErrors,
694
    LPFTCOMSTAT lpftComstat
695
        );
696
 
697
FTD2XX_API
698
BOOL WINAPI FT_W32_EscapeCommFunction(
699
    FT_HANDLE ftHandle,
700
        DWORD dwFunc
701
        );
702
 
703
FTD2XX_API
704
BOOL WINAPI FT_W32_GetCommModemStatus(
705
    FT_HANDLE ftHandle,
706
        LPDWORD lpdwModemStatus
707
        );
708
 
709
FTD2XX_API
710
BOOL WINAPI FT_W32_GetCommState(
711
    FT_HANDLE ftHandle,
712
    LPFTDCB lpftDcb
713
        );
714
 
715
FTD2XX_API
716
BOOL WINAPI FT_W32_GetCommTimeouts(
717
    FT_HANDLE ftHandle,
718
    FTTIMEOUTS *pTimeouts
719
        );
720
 
721
FTD2XX_API
722
BOOL WINAPI FT_W32_PurgeComm(
723
    FT_HANDLE ftHandle,
724
        DWORD dwMask
725
        );
726
 
727
FTD2XX_API
728
BOOL WINAPI FT_W32_SetCommBreak(
729
    FT_HANDLE ftHandle
730
        );
731
 
732
FTD2XX_API
733
BOOL WINAPI FT_W32_SetCommMask(
734
    FT_HANDLE ftHandle,
735
    ULONG ulEventMask
736
    );
737
 
738
FTD2XX_API
739
BOOL WINAPI FT_W32_SetCommState(
740
    FT_HANDLE ftHandle,
741
    LPFTDCB lpftDcb
742
        );
743
 
744
FTD2XX_API
745
BOOL WINAPI FT_W32_SetCommTimeouts(
746
    FT_HANDLE ftHandle,
747
    FTTIMEOUTS *pTimeouts
748
        );
749
 
750
FTD2XX_API
751
BOOL WINAPI FT_W32_SetupComm(
752
    FT_HANDLE ftHandle,
753
        DWORD dwReadBufferSize,
754
        DWORD dwWriteBufferSize
755
        );
756
 
757
FTD2XX_API
758
BOOL WINAPI FT_W32_WaitCommEvent(
759
    FT_HANDLE ftHandle,
760
    PULONG pulEvent,
761
        LPOVERLAPPED lpOverlapped
762
    );
763
 
764
 
765
 
766
 
767
#ifdef __cplusplus
768
}
769
#endif
770
 
771
 
772
#endif  /* FTD2XX_H */
773
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.