Commit | Line | Data |
---|---|---|
b790d38e UB |
1 | /*************************************************************************** |
2 | ftdi_i.h - description | |
3 | ------------------- | |
4 | begin : Don Sep 9 2011 | |
5 | copyright : (C) 2003-2011 by Intra2net AG and the libftdi developers | |
6 | email : opensource@intra2net.com | |
7 | ***************************************************************************/ | |
8 | ||
9 | /*************************************************************************** | |
10 | * * | |
11 | * This program is free software; you can redistribute it and/or modify * | |
12 | * it under the terms of the GNU Lesser General Public License * | |
13 | * version 2.1 as published by the Free Software Foundation; * | |
14 | * * | |
15 | *************************************************************************** | |
16 | ||
17 | Non public definitions here | |
18 | ||
19 | */ | |
20 | ||
21 | /* Even on 93xx66 at max 256 bytes are used (AN_121)*/ | |
22 | #define FTDI_MAX_EEPROM_SIZE 256 | |
23 | ||
24 | /** | |
25 | \brief FTDI eeprom structure | |
26 | */ | |
27 | struct ftdi_eeprom | |
28 | { | |
29 | /** vendor id */ | |
30 | int vendor_id; | |
31 | /** product id */ | |
32 | int product_id; | |
33 | ||
34 | /** Was the eeprom structure initialized for the actual | |
35 | connected device? **/ | |
36 | int initialized_for_connected_device; | |
37 | ||
38 | /** self powered */ | |
39 | int self_powered; | |
40 | /** remote wakeup */ | |
41 | int remote_wakeup; | |
42 | ||
43 | int is_not_pnp; | |
44 | ||
45 | /* Suspend on DBUS7 Low */ | |
46 | int suspend_dbus7; | |
47 | ||
48 | /** input in isochronous transfer mode */ | |
49 | int in_is_isochronous; | |
50 | /** output in isochronous transfer mode */ | |
51 | int out_is_isochronous; | |
52 | /** suspend pull downs */ | |
53 | int suspend_pull_downs; | |
54 | ||
55 | /** use serial */ | |
56 | int use_serial; | |
57 | /** usb version */ | |
58 | int usb_version; | |
59 | /** Use usb version on FT2232 devices*/ | |
60 | int use_usb_version; | |
61 | /** maximum power */ | |
62 | int max_power; | |
63 | ||
64 | /** manufacturer name */ | |
65 | char *manufacturer; | |
66 | /** product name */ | |
67 | char *product; | |
68 | /** serial number */ | |
69 | char *serial; | |
70 | ||
71 | /* 2232D/H(/FT4432H?) specific */ | |
72 | /* Hardware type, 0 = RS232 Uart, 1 = 245 FIFO, 2 = CPU FIFO, | |
73 | 4 = OPTO Isolate */ | |
74 | int channel_a_type; | |
75 | int channel_b_type; | |
76 | /* Driver Type, 1 = VCP */ | |
77 | int channel_a_driver; | |
78 | int channel_b_driver; | |
79 | ||
80 | /* Special function of FT232R/FT232H devices (and possibly others as well) */ | |
81 | /** CBUS pin function. See CBUS_xxx defines. */ | |
720c7d24 | 82 | int cbus_function[10]; |
b790d38e UB |
83 | /** Select hight current drive on R devices. */ |
84 | int high_current; | |
85 | /** Select hight current drive on A channel (2232C */ | |
86 | int high_current_a; | |
87 | /** Select hight current drive on B channel (2232C). */ | |
88 | int high_current_b; | |
89 | /** Select inversion of data lines (bitmask). */ | |
90 | int invert; | |
91 | ||
92 | /*2232H/4432H Group specific values */ | |
93 | /* Group0 is AL on 2322H and A on 4232H | |
94 | Group1 is AH on 2232H and B on 4232H | |
95 | Group2 is BL on 2322H and C on 4232H | |
96 | Group3 is BH on 2232H and C on 4232H*/ | |
97 | int group0_drive; | |
98 | int group0_schmitt; | |
99 | int group0_slew; | |
100 | int group1_drive; | |
101 | int group1_schmitt; | |
102 | int group1_slew; | |
103 | int group2_drive; | |
104 | int group2_schmitt; | |
105 | int group2_slew; | |
106 | int group3_drive; | |
107 | int group3_schmitt; | |
108 | int group3_slew; | |
109 | ||
110 | int powersave; | |
111 | ||
112 | int clock_polarity; | |
113 | int data_order; | |
114 | int flow_control; | |
115 | ||
116 | /** eeprom size in bytes. This doesn't get stored in the eeprom | |
117 | but is the only way to pass it to ftdi_eeprom_build. */ | |
118 | int size; | |
119 | /* EEPROM Type 0x46 for 93xx46, 0x56 for 93xx56 and 0x66 for 93xx66*/ | |
120 | int chip; | |
121 | unsigned char buf[FTDI_MAX_EEPROM_SIZE]; | |
122 | }; | |
123 |