libftdi Archives

Subject: Re: [flashrom] [PATCH 3/5] ft2232_spi: allow CLOCK_X5 to be set at runtime

From: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Wed, 17 Nov 2010 20:35:05 +0100
On 11/13/2010 05:33 AM, Carl-Daniel Hailfinger wrote:
> On 12.11.2010 13:44, Joerg Mayer wrote:
>> On Fri, Nov 12, 2010 at 12:52:14PM +0100, Carl-Daniel Hailfinger wrote:
>>
>> #if (defined TYPE_2232H and defined TYPE_4232H)
>>   
>>>> +  if (ftdic->type != TYPE_2232H && ftdic->type != TYPE_4232H) {
>>>> +          msg_pdbg("FTDI chip type %d is not high-speed\n",
>>>> +                  ftdic->type);
>>>> +          clock_5x = 0;
>>>> +  }
>>>>       
>> #endif
>>   
> 
> That doesn't work because TYPE_2232H is an enum.

It could work with a test during configure time:

If libftdi's enum doesn't support TYPE_2232H/TYPE_4232H because
the version is too old, #define a workaround variable in config.h
with the name of TYPE_2232H and TYPE_4232H. Macros perform
plain text substitution, it should work.

Thomas

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

Current Thread