Hi,

On Thu, Nov 24, 2016 at 12:08:24PM +0100, b...@biot.com wrote:
> It looks like libftdi, while it does set a timeout on the async
> transfer, never actually checks whether the condition occurred in the
> transfer's callback.
> 
> The timeout itself is a default value, hardcoded, which cannot be
> changed or configured by client code.
> 
> > I'm not familiar with libftdi and libusb libraries and any any advice would
> > be most welcome.
> 
> Clearly, libftdi will not handle this situation you need to deal with.
> Since libftdi is a thin and unnecessary abstraction layer on top of
> libusb which provides no values other than configuring the FTDI chip
> (which is trivial), I recommend getting rid of it altogether.
> 
> Simply convert the driver to libusb calls instead. You can use the
> current calls to libftdi and its libusb actions as a guide, or check the
> code in many other libsigrok drivers.

I agree. I actually wouldn't mind getting rid of libftdi completely in
libsigrok (long-term). I wasn't very fond of that idea in the past, but
seeing how more and more issues pop up that libftdi cannot really
handle well (and in many other cases is indeed a thin wrapper that could
be replaced easily) it makes more and more sense.

We already have to mix libusb and libftdi in some drivers due to other
limitations, which is not great either (and probably is broken anyway
if people use libftdi (not libftdi1) and libusb1 together, not sure).

Added #878 for that.


Cheers, Uwe.
-- 
http://hermann-uwe.de | http://randomprojects.org | http://sigrok.org

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to