libftdi Archives

Subject: Re: [PATCH] Match close with open in ftdi_usb_get_strings

From: Fahrzin Hemmati <fahhem@xxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Cc: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Mon, 18 Apr 2016 21:14:55 +0000
Ah, sorry about that. gmail doesn't make 'text' vs 'html' emails an option, I'll look for something that does next time.

The EEPROM being opaque actually bothered me in an application (I needed to replace some bits not available otherwise), but thankfully (accidentally?) the Python bindings grab the struct directly so I was able to do what I needed. I wouldn't recommend going opaque unless you've made all the fields accessible.

Thanks!


On Mon, Apr 18, 2016 2:06 PM, Thomas Jarosch thomas.jarosch@xxxxxxxxxxxxx wrote:
Hi Fahrzin, Am 09.04.2016 um 10:45 schrieb Fahrzin Hemmati: > It seems libftdi has a lot of ...2() functions, so a major API revision > may make sense to just wipe those compat layers away. In any case, I > went with ftdi_usb_get_strings2() with a short compat wrapper that opens > the device first so ftdi_usb_get_strings2() won't open nor close it, > then closes it itself. This matches the expected behavior. > > Here's the patch: thanks, applied! I had to manually copy the patch hunks over since the HTML email mangled the diff lines. Patches are much better sent as text only messages ;) Please double check I didn't break anything in the process. I've massaged the changelog a bit, added the function to ftdi.h and to the python wrapper. libftdi has a few xxx2() functions to ensure backward compatibility. If we ever change the API to be opaque like it is for the EEPROM (get and set functions), then a major API revision might make sense. I just don't want to break flashrom, openocd and a ton of other programs for no real reason. Cheers, Thomas -- libftdi - see http://www.intra2net.com/en/developer/libftdi for details. To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx


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


Current Thread