libftdi Archives

Subject: ftdi_convert_baudrate bug ?

From: Pierre Molinaro <pcmolinaro@xxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Sun, 4 May 2014 18:51:45 +0200
Hi,

I use libftdi 1-1.1 (last release) with interface B of an Olimex ARM-USB-OCD 
JTAG. All is working fine, but change baud rate. ftdi_set_baudrate () does not 
fail, it returns 0, but has no effect on baud rate.

I have found this message in libftdi archives :
        
http://developer.intra2net.com/mailarchive/html/libftdi/2013/msg00207.html

It suggested the following change in ftdi_convert_baudrate () function:
------
if (ftdi->type == TYPE_2232H || 
        ftdi->type == TYPE_4232H ||
        ftdi->type == TYPE_232H )
    {
        *index = (unsigned short)(encoded_divisor >> 8);
    }
    else
    {
        *index = (unsigned short)(encoded_divisor >> 16);
    }
    *index &= 0xFF00;
    *index |= ftdi->index;
------
Applying this change works fine for me. Is this change can be done in future 
releases ?

Best regards,
Pierre Molinaro


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

Current Thread