libftdi Archives

Subject: Re: libftdi patches : [Patch 5/5] : Adding partial support for FT230X

From: Nathael Pajani <nathael.pajani@xxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Wed, 10 Apr 2013 10:41:15 +0200
Hi,

Hum ... no, it was not intentional, but I did not know where the 0x56 and the 
0x66 values
came from, and I had to find a way to get it working for the FT230X chip ...
The eeprom size is changed in different places, so I added this here to change 
the size
only if hadn't been changed/set before.

The previous place where it is set is in ftdi_eeprom_initdefaults() where I 
added the
setting to -1 if ftdi->type is diferent from TYPE_R, TYPE_230X and TYPE_232H.

+++

Le 10/04/2013 10:33, Thomas Jarosch a écrit :
> Hi Nathael,
> 
> also applied, thanks a lot for this!
> 
> 
> I'm a bit worried about this change:
> 
> @@ -2560,10 +2578,12 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi)
>      if (eeprom->chip == -1)
>          ftdi_error_return(-6,"No connected EEPROM or EEPROM type unknown");
>  
> -    if ((eeprom->chip == 0x56) || (eeprom->chip == 0x66))
> -        eeprom->size = 0x100;
> -    else
> -        eeprom->size = 0x80;
> +    if (eeprom->size == -1) {
> +        if ((eeprom->chip == 0x56) || (eeprom->chip == 0x66))
> +            eeprom->size = 0x100;
> +        else
> +            eeprom->size = 0x80;
> +    }
>  
>      if (eeprom->manufacturer != NULL)
>          manufacturer_size = strlen(eeprom->manufacturer);
> 
> 
> This changes the behavior for the existing chip types.
> Was that intentional?
> 
> Thomas
> 
> 
> --
> libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
> To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   
> 


-- 
Nathaël PAJANI
ED3L - Étude et Développement - Linux et Logiciels Libres
Internet : http://www.ed3l.fr

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

Current Thread