libftdi Archives

Subject: Re: [Patch] Fix ftdi.h for async write API change

From: Youness Alaoui <kakaroto@xxxxxxxxxxxxxxxxxxxxxx>
To: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
Cc: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Mon, 26 Mar 2012 13:57:32 -0400


On Mon, Mar 26, 2012 at 11:28 AM, Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx> wrote:
On Monday, 26. March 2012 00:26:45 Youness Alaoui wrote:
> I've been playing around withlibftdi and I noticed that the git master
> version has an API change, removing the ftdi_{read|write}_data_async and
> replacing it with ftdi_{read|write}_data_submit. But the ftdi.h file
> wasn't modified properly, only the read_async prototype was replaced,
> the write_async is still there (causing undefined symbol, etc..).
> Attached is a patch to fix this small issue.

Applied, thanks!

Guess nobody is using the async api right now with libftdi 1.x.
Otherwise someone would have noticed earlier :)
Thanks!
It seems the read_data_submit was used but not write_data_async. Even in my code, I only do the reads async, but as I was reviewing the library's code, I noticed that small issue.
it seems the ftdi card's output buffer is 2048 bytes, and if it's full, then you can't write anything to it in synchronized big bang mode. So if I wanted to write buffers bigger than 2048 bytes,  I was forced to have an async read while writing to the card, otherwise it would lock up until timeout (and report only 2048 bytes were written).

 

Thomas



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


Current Thread