From: Marius Kintel Date: Mon, 2 Mar 2009 17:39:42 +0000 (+0100) Subject: Adapted to new decode size parameter, disable debug output X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=316b8c40049f6d0ae57911bce4e9cf19831b0d34;p=ftdi_eeprom Adapted to new decode size parameter, disable debug output --- diff --git a/src/main.c b/src/main.c index bc153df..f42f642 100644 --- a/src/main.c +++ b/src/main.c @@ -148,7 +148,9 @@ int main(int argc, char *argv[]) { if (_read > 0) { printf("FTDI read eeprom: %d\n", ftdi_read_eeprom(&ftdi, (char *)eeprom_buf)); - ftdi_eeprom_decode(&eeprom, eeprom_buf); + ftdi_eeprom_decode(&eeprom, eeprom_buf, ftdi.eeprom_size); + /* Debug output */ + /* printf("vendor_id = \"%04x\"\n", eeprom.vendor_id); printf("product_id = \"%04x\"\n", eeprom.product_id); printf("BM_type_chip = \"%s\"\n", eeprom.BM_type_chip?"true":"false"); @@ -164,6 +166,7 @@ int main(int argc, char *argv[]) { printf("manufacturer = \"%s\"\n", eeprom.manufacturer); printf("product = \"%s\"\n", eeprom.product); printf("serial = \"%s\"\n", eeprom.serial); + */ if (filename != NULL && strlen(filename) > 0) { FILE *fp = fopen (filename, "wb"); @@ -197,7 +200,7 @@ int main(int argc, char *argv[]) { fclose(fp); } } - printf ("FTDI write eeprom: %d\n", ftdi_write_eeprom(&ftdi, (char *)eeprom_buf)); + printf ("FTDI write eeprom: %d\n", ftdi_write_eeprom(&ftdi, (char *)eeprom_buf)); } // Write to file?