.PP
.B sd-mux-ctrl [-liuortdspcmvexn?] [-l|--list] [-i|--info] [-u|--status] [-o|--show-serial] [-r|--set-serial=STRING] [-t|--init] [-d|--dut]
.B [-s|--ts] [-p|--pins=INT] [-c|--tick] [-y|--dyper1=STRING] [-z|--dyper2=STRING] [-m|--tick-time=INT] [-v|--device-id=INT]
-.B [-e|--device-serial=STRING] [-x|--vendor=INT] [-n|--invert] [-?|--help] [--usage]
+.B [-e|--device-serial=STRING] [-x|--vendor=INT] [-a|--product=INT] [-n|--invert] [-?|--help] [--usage]
.SH DESCRIPTION
4. \fBreset\fR connected DUT by power disconnecting and reconnecting after specified timeout
.RE
.PP
-After manufacturing, each new sd-mux device has VENDOR ID set to 0x0403 which is the ID of FTDI company on whose chip
+After manufacturing, each new sd-mux device has VENDOR ID set to 0x0403 which is the ID of FTDI company of whose chip
(FT245RL) the device is based.
Before first real use, the device should be given a unique serial number.
To do that \fB--set-serial\fR command must be executed. \fB--set-serial\fR command writes additional information and
\-x, \-\-vendor
.RS 2
Set VENDOR ID of devices which are to be used by sd-mux-ctrl. Default value is 0x04e8 which is assigned to
-SAMSUNG Electronics Company. DEVICE ID is hard-coded and is equal to 0x6001 - the default FTDI value.
+SAMSUNG Electronics Company. Default PRODUCT ID is equal to 0x6001 - the default FTDI value.
+.RE
+
+.PP
+\-a, \-\-product
+.RS 2
+Set PRODUCT ID of devices which are to be used by sd-mux-ctrl. Default value is 0x6001.
.RE
.PP
.SS \fB\-l, \-\-list\fR
.RS 2
-Print list of all connected sd-mux devices and exit. It takes optional \fB--vendor\fR argument which allows to use
-other VENDOR ID then the default one.
-The default value is 0x04e8 which belongs to SAMSUNG Electronics Company.
-VENDOR ID is used to discover all connected sd-mux devices. This is very important in post production
+Print list of all connected sd-mux devices and exit. It takes optional \fB--vendor --product\fR arguments that allow to use
+other VENDOR and PRODUCT IDs then the default ones.
+The default value is 0x04e8:6001 which belongs to SAMSUNG Electronics Company.
+VENDOR and PRODUCT IDs are used to discover all connected sd-mux devices. This is very important in post production
(sd-mux device) phase, before first use.
.RE
CCO_TickTime,
CCO_BitsInvert,
CCO_Vendor,
+ CCO_Product,
CCO_DyPer,
CCO_MAX
};
return EXIT_FAILURE;
}
- if ((fret = ftdi_usb_find_all(ftdi, &devlist, options[CCO_Vendor].argn, PRODUCT)) < 0) {
+ if ((fret = ftdi_usb_find_all(ftdi, &devlist, options[CCO_Vendor].argn, options[CCO_Product].argn)) < 0) {
fprintf(stderr, "ftdi_usb_find_all failed: %d (%s)\n", fret, ftdi_get_error_string(ftdi));
ftdi_free(ftdi);
return EXIT_FAILURE;
}
if (options[CCO_DeviceSerial].args != NULL) {
- fret = ftdi_usb_open_desc_index(ftdi, options[CCO_Vendor].argn, PRODUCT, NULL, options[CCO_DeviceSerial].args, 0);
+ fret = ftdi_usb_open_desc_index(ftdi, options[CCO_Vendor].argn, options[CCO_Product].argn, NULL, options[CCO_DeviceSerial].args, 0);
} else {
- fret = ftdi_usb_open_desc_index(ftdi, options[CCO_Vendor].argn, PRODUCT, NULL, NULL, options[CCO_DeviceId].argn);
+ fret = ftdi_usb_open_desc_index(ftdi, options[CCO_Vendor].argn, options[CCO_Product].argn, NULL, NULL, options[CCO_DeviceId].argn);
}
if (fret < 0) {
fprintf(stderr, "Unable to open ftdi device: %d (%s)\n", fret, ftdi_get_error_string(ftdi));
goto finish_him;
}
+ f = ftdi_set_eeprom_value(ftdi, PRODUCT_ID, PRODUCT);
+ if (f < 0) {
+ fprintf(stderr, "Unable to set eeprom strings: %d (%s)\n", f, ftdi_get_error_string(ftdi));
+ goto finish_him;
+ }
+
f = ftdi_eeprom_build(ftdi);
if (f < 0) {
fprintf(stderr, "Unable to build eeprom: %d (%s)\n", f, ftdi_get_error_string(ftdi));
{ "device-serial", 'e', POPT_ARG_STRING, &options[CCO_DeviceSerial].args, 'e',
"use device with given serial number", NULL },
{ "vendor", 'x', POPT_ARG_INT, &options[CCO_Vendor].argn, 'x', "use device with given vendor id", NULL },
+ { "product", 'a', POPT_ARG_INT, &options[CCO_Product].argn, 'a', "use device with given product id", NULL },
{ "invert", 'n', POPT_ARG_NONE, NULL, 'n', "invert bits for --pins command", NULL },
POPT_AUTOHELP
{ NULL, 0, 0, NULL, 0, NULL, NULL }
memset(&options, 0, sizeof(options));
options[CCO_DeviceId].argn = -1;
options[CCO_Vendor].argn = SAMSUNG_VENDOR;
+ options[CCO_Product].argn = PRODUCT;
if (parseArguments(argc, argv, &cmd, &arg, args, sizeof(args), options) != EXIT_SUCCESS) {
return EXIT_FAILURE;