X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=blobdiff_plain;f=src%2Fftdi.c;h=297fa28a908b05bd91fb4965ff73a11accccbc9e;hp=c4ec000fd080972033b69e1e27412588b758488d;hb=38801bf8af278a43149862ab7a07128f8c4d5aab;hpb=2c2953e66c7167e76fe64633435a5b232a8efc40 diff --git a/src/ftdi.c b/src/ftdi.c index c4ec000..297fa28 100644 --- a/src/ftdi.c +++ b/src/ftdi.c @@ -2641,6 +2641,7 @@ int ftdi_eeprom_decode(struct ftdi_context *ftdi, unsigned char *buf, int size, unsigned char manufacturer_size = 0, product_size = 0, serial_size = 0; int eeprom_size; struct ftdi_eeprom *eeprom; + int release; if (ftdi == NULL) ftdi_error_return(-1,"No context"); @@ -2658,7 +2659,7 @@ int ftdi_eeprom_decode(struct ftdi_context *ftdi, unsigned char *buf, int size, // Addr 04: Product ID eeprom->product_id = buf[0x04] + (buf[0x05] << 8); - eeprom->release = buf[0x06] + (buf[0x07]<<8); + release = buf[0x06] + (buf[0x07]<<8); // Addr 08: Config descriptor // Bit 7: always 1 @@ -2843,7 +2844,7 @@ int ftdi_eeprom_decode(struct ftdi_context *ftdi, unsigned char *buf, int size, char *channel_mode[] = {"UART","245","CPU", "unknown", "OPTO"}; fprintf(stdout, "VID: 0x%04x\n",eeprom->vendor_id); fprintf(stdout, "PID: 0x%04x\n",eeprom->product_id); - fprintf(stdout, "Release: 0x%04x\n",eeprom->release); + fprintf(stdout, "Release: 0x%04x\n",release); if(eeprom->self_powered) fprintf(stdout, "Self-Powered%s", (eeprom->remote_wakeup)?", USB Remote Wake Up\n":"\n");