[prev in list] [next in list] [prev in thread] [next in thread]
List: libftdi
Subject: eeprom->chip problem
From: "Sniegowski, Dean" <Dean.Sniegowski () viasat ! com>
Date: 2015-12-19 0:14:15
Message-ID: C0D64A6151AB124CB78205D7C593F931C5F127E4 () wdc1exchmbxp03 ! hq ! corp ! viasat ! com
[Download RAW message or body]
Hello I'm using a 4232H device with a 93x56 eeprom.
I was having a problem writing to the eeprom. My manufacturer, product, and serial \
strings are written to the wrong location.
My code looks like:
ftdi_eeprom_initdefaults(ftdi, "manufact1", "product2", "serial3" );
ftdi->eeprom->product_id = 0x6011;
ftdi->eeprom->vendor_id = 0x0403;
ftdi_eeprom_build(ftdi);
ftdi_write_eeprom(ftdi);
The problem is ftdi_eeprom_initdefaults zeroizes the ftdi->eeprom struct. This \
includes ftdi->eeprom->chip.
When ftdi_eeprom_build is called,
2581 if (eeprom->size == -1)
2582 {
2583 if ((eeprom->chip == 0x56) || (eeprom->chip == 0x66))
2584 eeprom->size = 0x100;
2585 else
2586 eeprom->size = 0x80;
2587 }
eeprom size is incorrect set to 0x80 instead to 0x100
It seems like ftdi_eeprom_initdefaults should set the eeprom->chip like \
ftdi_erase_eeprom() does it.
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@developer.intra2net.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic