libftdi Archives

Subject: Re: [EEPROM branch] "size_check" init value

From: Uwe Bonnes <bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Fri, 24 Sep 2010 11:04:44 +0200
>>>>> "Thomas" == Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx> writes:

    Thomas> Hello Uwe, looking at this code:

    Thomas> int ftdi_eeprom_build(struct ftdi_context *ftdi) { ...  if
    Thomas> ((eeprom->chip == 0x56) || (eeprom->chip == 0x66))
    eeprom-> size = 0x100;
    Thomas>     else
    eeprom-> size = 0x80;

    Thomas> ...  ...  size_check = 0x80;


    Thomas> Shouldn't we init "size_check" with eeprom->size?

No!

The strings may only take up 0x80 bytes. This is how I interprete AN_121
"accessing the EEPROM User Area". And with the data layout in a 56/66 chip,
string data would then end above 0xff.

Bye
-- 
Uwe Bonnes                bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread