Quantcast

New function for getting eeprom strings

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

New function for getting eeprom strings

Adam Malinowski
Hi all,

I needed to get product string form FTDI's eeprom and I foun that this is not that straightforward. It is doable but very inconvenient and nonintuitive so I decided to add new function which will do the jib. I called it ftdi_eeprom_get_strings().
The patch is attached to this email.

If this is wrong way to post patch then please inform me about the correct way.
Bests.


libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]



0001-Add-new-function-ftdi_eeprom_get_strings.patch (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New function for getting eeprom strings

Thomas Jarosch
Hello Adam,

On Thursday, 16 February 2017 15:58:14 CET Adam Malinowski wrote:
> I needed to get product string form FTDI's eeprom and I foun that this is
> not that straightforward. It is doable but very inconvenient and
> nonintuitive so I decided to add new function which will do the jib. I
> called it ftdi_eeprom_get_strings().

thanks, applied.

I've also added doxygen documentation and python wrapper support on top.
The python support is untested, I've cloned the ftdi_usb_get_strings() code.

One question: Why is this check in there:

+    if (ftdi->usb_dev == NULL)
+        ftdi_error_return(-3, "No connected device or device not yet opened");


Won't the code work for eeproms read from file?

Cheers,
Thomas


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New function for getting eeprom strings

Adam Malinowski
Hi Thomas,

My bad. The check is not needed.I was influened by ftdi_eeprom_set_strings() function.
Do you think that I should prepare another patch (removing the check), or may it stay as it is?

Thanks.
Adam

2017-02-22 10:20 GMT+01:00 Thomas Jarosch <[hidden email]>:
Hello Adam,

On Thursday, 16 February 2017 15:58:14 CET Adam Malinowski wrote:
> I needed to get product string form FTDI's eeprom and I foun that this is
> not that straightforward. It is doable but very inconvenient and
> nonintuitive so I decided to add new function which will do the jib. I
> called it ftdi_eeprom_get_strings().

thanks, applied.

I've also added doxygen documentation and python wrapper support on top.
The python support is untested, I've cloned the ftdi_usb_get_strings() code.

One question: Why is this check in there:

+    if (ftdi->usb_dev == NULL)
+        ftdi_error_return(-3, "No connected device or device not yet opened");


Won't the code work for eeproms read from file?

Cheers,
Thomas




libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New function for getting eeprom strings

Thomas Jarosch
On Wednesday, 22 February 2017 11:51:59 CET Adam Malinowski wrote:
> My bad. The check is not needed.I was influened
> by ftdi_eeprom_set_strings() function.
> Do you think that I should prepare another patch (removing the check), or
> may it stay as it is?

na, I just committed a fix :)

Cheers,
Tom


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New function for getting eeprom strings

Adam Malinowski
Thanks :)

2017-02-22 11:56 GMT+01:00 Thomas Jarosch <[hidden email]>:
On Wednesday, 22 February 2017 11:51:59 CET Adam Malinowski wrote:
> My bad. The check is not needed.I was influened
> by ftdi_eeprom_set_strings() function.
> Do you think that I should prepare another patch (removing the check), or
> may it stay as it is?

na, I just committed a fix :)

Cheers,
Tom




libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]


Loading...