Evaluate eeprom Byte 0 Bit 7: Suspend on DBUS7 low
authorUwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Thu, 9 Sep 2010 22:24:00 +0000 (00:24 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 20 Sep 2010 13:34:39 +0000 (15:34 +0200)
src/ftdi.c
src/ftdi.h

index 355ea58..5ab9bfc 100644 (file)
@@ -2518,6 +2518,8 @@ int ftdi_eeprom_decode(struct ftdi_context *ftdi, unsigned char *buf, int size,
     eeprom->channel_b_driver = buf[0x01] & DRIVER_VCP;
     eeprom->high_current_b   = buf[0x01] & HIGH_CURRENT_DRIVE;
 
+    eeprom->suspend_dbus7    = buf[0x01] & SUSPEND_DBUS7;
+
     // Addr 02: Vendor ID
     eeprom->vendor_id = buf[0x02] + (buf[0x03] << 8);
 
index 2f6402a..281c261 100644 (file)
@@ -185,6 +185,9 @@ struct ftdi_eeprom
     /** release */
     int release;
 
+    /* Suspend on DBUS7 Low */
+    int suspend_dbus7;
+
     /** input in isochronous transfer mode */
     int in_is_isochronous;
     /** output in isochronous transfer mode */
@@ -382,6 +385,8 @@ struct ftdi_device_list
 /** Driver Type. */
 #define DRIVER_VCP 0x08
 
+#define SUSPEND_DBUS7 0x80
+
 /** High current drive. */
 #define HIGH_CURRENT_DRIVE 0x10