Add bitmode for synchronous fifo if FT2232H
[libftdi] / src / ftdi.h
index e02c32b..0c4620b 100644 (file)
@@ -42,7 +42,8 @@ enum ftdi_mpsse_mode
     BITMODE_MCU    = 0x08,
     /* CPU-style fifo mode gets set via EEPROM */
     BITMODE_OPTO   = 0x10,
-    BITMODE_CBUS   = 0x20
+    BITMODE_CBUS   = 0x20,
+    BITMODE_SYNCFF = 0x40
 };
 
 /** Port interface for FT2232C */
@@ -50,7 +51,9 @@ enum ftdi_interface
 {
     INTERFACE_ANY = 0,
     INTERFACE_A   = 1,
-    INTERFACE_B   = 2
+    INTERFACE_B   = 2,
+    INTERFACE_C   = 3,
+    INTERFACE_D   = 4
 };
 
 /* Shifting commands IN MPSSE Mode*/
@@ -265,7 +268,7 @@ extern "C"
 #endif
 
     int ftdi_init(struct ftdi_context *ftdi);
-    struct ftdi_context *ftdi_new();
+    struct ftdi_context *ftdi_new(void);
     int ftdi_set_interface(struct ftdi_context *ftdi, enum ftdi_interface interface);
 
     void ftdi_deinit(struct ftdi_context *ftdi);
@@ -345,8 +348,11 @@ extern "C"
     int ftdi_write_eeprom(struct ftdi_context *ftdi, unsigned char *eeprom);
     int ftdi_erase_eeprom(struct ftdi_context *ftdi);
 
+    int ftdi_read_eeprom_location (struct ftdi_context *ftdi, int eeprom_addr, unsigned short *eeprom_val);
+    int ftdi_write_eeprom_location(struct ftdi_context *ftdi, int eeprom_addr, unsigned short eeprom_val);
+
     char *ftdi_get_error_string(struct ftdi_context *ftdi);
+
 #ifdef __cplusplus
 }
 #endif