libftdi1  1.0
ftdi_i.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                           ftdi_i.h  -  description
00003                              -------------------
00004     begin                : Don Sep 9 2011
00005     copyright            : (C) 2003-2013 by Intra2net AG and the libftdi developers
00006     email                : opensource@intra2net.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU Lesser General Public License           *
00013  *   version 2.1 as published by the Free Software Foundation;             *
00014  *                                                                         *
00015  ***************************************************************************
00016 
00017  Non public definitions here
00018 
00019 */
00020 
00021 /* Even on 93xx66 at max 256 bytes are used (AN_121)*/
00022 #define FTDI_MAX_EEPROM_SIZE 256
00023 
00025 #define MAX_POWER_MILLIAMP_PER_UNIT 2
00026 
00030 struct ftdi_eeprom
00031 {
00033     int vendor_id;
00035     int product_id;
00036 
00039     int initialized_for_connected_device;
00040 
00042     int self_powered;
00044     int remote_wakeup;
00045 
00046     int is_not_pnp;
00047 
00048     /* Suspend on DBUS7 Low */
00049     int suspend_dbus7;
00050 
00052     int in_is_isochronous;
00054     int out_is_isochronous;
00056     int suspend_pull_downs;
00057 
00059     int use_serial;
00061     int usb_version;
00063     int use_usb_version;
00065     int max_power;
00066 
00068     char *manufacturer;
00070     char *product;
00072     char *serial;
00073 
00074     /* 2232D/H specific */
00075     /* Hardware type, 0 = RS232 Uart, 1 = 245 FIFO, 2 = CPU FIFO, 
00076        4 = OPTO Isolate */
00077     int channel_a_type;
00078     int channel_b_type;
00079     /*  Driver Type, 1 = VCP */
00080     int channel_a_driver;
00081     int channel_b_driver;
00082     int channel_c_driver;
00083     int channel_d_driver;
00084     /* 4232H specific */
00085     int channel_a_rs485enable;
00086     int channel_b_rs485enable;
00087     int channel_c_rs485enable;
00088     int channel_d_rs485enable;
00089 
00090     /* Special function of FT232R/FT232H devices (and possibly others as well) */
00092     int cbus_function[10];
00094     int high_current;
00096     int high_current_a;
00098     int high_current_b;
00100     int invert;
00101 
00102     /*2232H/4432H Group specific values */
00103     /* Group0 is AL on 2322H and A on 4232H
00104        Group1 is AH on 2232H and B on 4232H
00105        Group2 is BL on 2322H and C on 4232H
00106        Group3 is BH on 2232H and C on 4232H*/
00107     int group0_drive;
00108     int group0_schmitt;
00109     int group0_slew;
00110     int group1_drive;
00111     int group1_schmitt;
00112     int group1_slew;
00113     int group2_drive;
00114     int group2_schmitt;
00115     int group2_slew;
00116     int group3_drive;
00117     int group3_schmitt;
00118     int group3_slew;
00119 
00120     int powersave;
00121 
00122     int clock_polarity;
00123     int data_order;
00124     int flow_control;
00125 
00128     int size;
00129     /* EEPROM Type 0x46 for 93xx46, 0x56 for 93xx56 and 0x66 for 93xx66*/
00130     int chip;
00131     unsigned char buf[FTDI_MAX_EEPROM_SIZE];
00132 };
00133