libftdi Archives

Subject: Re: Decode/Encode use_usb_version on BM and 2232C

From: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Mon, 4 Oct 2010 10:11:55 +0200
Hello Uwe,

On Saturday, 2. October 2010 17:34:16 Uwe Bonnes wrote:
> index e33572b..0b19838 100644
> --- a/src/ftdi.c
> +++ b/src/ftdi.c
> @@ -2490,6 +2490,11 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi)
>      case TYPE_BM:
>          output[0x0C] = eeprom->usb_version & 0xff;
>          output[0x0D] = (eeprom->usb_version>>8) & 0xff;
> +        if (eeprom->use_usb_version == USE_USB_VERSION_BIT)
> +            output[0x0A] |= USE_USB_VERSION_BIT;
> +        else
> +            output[0x0A] &= ~USE_USB_VERSION_BIT;
> + 
>          break;
>      case TYPE_2232C:

Thanks for your patch(es)!

One thing I noticed: The "use_usb_version" field and "use_serial" fields
contain either zero or f.e. 0x10. Without taking a close look at
the API implementation, I would expect them to be zero or one.

That's also the way the previous eeprom code handled the use_serial field.
Could we change that to the old behavior?

Cheers,
Thomas

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

Current Thread