git://developer.intra2net.com
/
libftdi
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
1bc78a0
)
For EEPROM decoding, use the evaluated EEPROM size. FT223R is special case, as the...
author
Uwe Bonnes
<bon@elektron.ikp.physik.tu-darmstadt.de>
Wed, 8 Sep 2010 14:02:48 +0000 (16:02 +0200)
committer
Thomas Jarosch
<thomas.jarosch@intra2net.com>
Mon, 20 Sep 2010 13:34:36 +0000 (15:34 +0200)
src/ftdi.c
patch
|
blob
|
blame
|
history
diff --git
a/src/ftdi.c
b/src/ftdi.c
index
36bcf3b
..
5a27ac3
100644
(file)
--- a/
src/ftdi.c
+++ b/
src/ftdi.c
@@
-2493,14
+2493,17
@@
int ftdi_eeprom_decode(struct ftdi_context *ftdi, unsigned char *buf, int size)
unsigned char i, j;
unsigned short checksum, eeprom_checksum, value;
unsigned char manufacturer_size = 0, product_size = 0, serial_size = 0;
- int eeprom_size = 128;
+ int eeprom_size;
struct ftdi_eeprom *eeprom;
if (ftdi == NULL)
ftdi_error_return(-1,"No context");
if (ftdi->eeprom == NULL)
ftdi_error_return(-1,"No eeprom");
-
+
+ eeprom_size = ftdi->eeprom->size;
+ if(ftdi->type == TYPE_R)
+ eeprom_size = 0x80;
eeprom = ftdi->eeprom;
#if 0
size_check = eeprom->size;