}
/**
+ Set module detach mode.
+
+ \param ftdi pointer to ftdi_context
+ \param mode detach mode to use.
+
+ \retval 0: all fine
+ \retval -1: can't enable bitbang mode
+*/
+int ftdi_set_module_detach_mode(struct ftdi_context *ftdi, enum ftdi_module_detach_mode mode)
+{
+ if (ftdi == NULL)
+ ftdi_error_return(-1, "FTDI context invalid");
+
+ ftdi->module_detach_mode = mode;
+ return 0;
+}
+
+/**
Disable bitbang mode.
\param ftdi pointer to ftdi_context
(eeprom->data_order)?"LSB":"MSB",
(eeprom->flow_control)?"":"No ");
}
- if ((ftdi->type == TYPE_2232H) || (ftdi->type == TYPE_4232H))
+ if ((ftdi->type == TYPE_2232H) || (ftdi->type == TYPE_4232H) || (ftdi->type == TYPE_2232C))
fprintf(stdout,"Channel B has Mode %s%s%s\n",
channel_mode[eeprom->channel_b_type],
(eeprom->channel_b_driver)?" VCP":"",
(eeprom->high_current_b)?" High Current IO":"");
+ if (ftdi->type == TYPE_4232H)
+ {
+ fprintf(stdout,"Channel C has Mode UART%s\n",
+ (eeprom->channel_c_driver)?" VCP":"");
+ fprintf(stdout,"Channel D has Mode UART%s\n",
+ (eeprom->channel_d_driver)?" VCP":"");
+ }
if (((ftdi->type == TYPE_BM) || (ftdi->type == TYPE_2232C)) &&
eeprom->use_usb_version)
fprintf(stdout,"Use explicit USB Version %04x\n",eeprom->usb_version);
case EXTERNAL_OSCILLATOR:
*value = ftdi->eeprom->external_oscillator;
break;
+ case USER_DATA_ADDR:
+ *value = ftdi->eeprom->user_data_addr;
+ break;
default:
ftdi_error_return(-1, "Request for unknown EEPROM value");
}