libftdi Archives

Subject: Re: [PATCH] Proper initialisation of interface A.

From: Vladimir Yakovlev <nagos@xxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Wed, 12 Jan 2011 14:47:34 +0300
2011/1/10 Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>:
> Hello Vladimir,
>
> On Thursday, 30. December 2010 13:33:05 Vladimir Yakovlev wrote:
>> > There's also code in ftdi_usb_open_dev() to set interface A,
>> > maybe we can get rid of that?
>>
>> This code do nothing (tested on FT2232H). Index alyaws set to 0, even
>> without my patch by ftdi_init()
>
> ftdi_usb_open_dev() gets called after ftdi_init(). The switch should
> set the "ftdi->index" to INTERFACE_A if "ftdi->type == TYPE_2232H" and
> it checks for "if !(ftdi->index)". Please correct me if I'm wrong.
>
> It still does the same as ftdi_set_interface(), so I'll remove it.
>
> Thomas
>
> --
> libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
> To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
>
>
With current version of libftdi you cant set channel A after B. Only
way to set A is re initialise device.
ftdi_set_interface(ftdi, INTERFACE_A);
do nothing (see code).
My patch intended to fix this problem.

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

Current Thread