// Determine maximum packet size. Init with default value.
// New hi-speed devices from FTDI use a packet size of 512 bytes
// but could be connected to a normal speed USB hub -> 64 bytes packet size.
- if (ftdi->type == TYPE_2232H || ftdi->type == TYPE_4232H)
+ if (ftdi->type == TYPE_2232H || ftdi->type == TYPE_4232H || ftdi->type == TYPE_232H)
packet_size = 512;
else
packet_size = 64;
ftdi->type = TYPE_2232H;
else if (dev->descriptor.bcdDevice == 0x800)
ftdi->type = TYPE_4232H;
+ else if (dev->descriptor.bcdDevice == 0x900)
+ ftdi->type = TYPE_232H;
// Set default interface on dual/quad type chips
switch(ftdi->type)
}
// Split into "value" and "index" values
*value = (unsigned short)(encoded_divisor & 0xFFFF);
- if (ftdi->type == TYPE_2232C || ftdi->type == TYPE_2232H || ftdi->type == TYPE_4232H)
+ if (ftdi->type == TYPE_2232C || ftdi->type == TYPE_2232H || ftdi->type == TYPE_4232H
+ || ftdi->type == TYPE_232H)
{
*index = (unsigned short)(encoded_divisor >> 8);
*index &= 0xFF00;
case TYPE_R:
output[0x07] = 0x06;
break;
+ case TYPE_2232H:
+ output[0x07] = 0x07;
+ break;
+ case TYPE_4232H:
+ output[0x07] = 0x08;
+ break;
+ case TYPE_232H:
+ output[0x07] = 0x09;
+ break;
default:
output[0x07] = 0x00;
}
value = buf[0x06] + (buf[0x07]<<8);
switch (value)
{
+ case 0x0900:
+ eeprom->chip_type = TYPE_232H;
+ break;
+ case 0x0800:
+ eeprom->chip_type = TYPE_4232H;
+ break;
+ case 0x0700:
+ eeprom->chip_type = TYPE_2232H;
+ break;
case 0x0600:
eeprom->chip_type = TYPE_R;
break;
#define FTDI_DEFAULT_EEPROM_SIZE 128
/** FTDI chip type */
-enum ftdi_chip_type { TYPE_AM=0, TYPE_BM=1, TYPE_2232C=2, TYPE_R=3, TYPE_2232H=4, TYPE_4232H=5 };
+enum ftdi_chip_type { TYPE_AM=0, TYPE_BM=1, TYPE_2232C=2, TYPE_R=3, TYPE_2232H=4, TYPE_4232H=5, TYPE_232H = 6 };
/** Parity mode for ftdi_set_line_property() */
enum ftdi_parity_type { NONE=0, ODD=1, EVEN=2, MARK=3, SPACE=4 };
/** Number of stop bits for ftdi_set_line_property() */