On Fri, Sep 28, 2012 at 10:48:24AM +0200, Thomas Jarosch wrote:
> On Friday, 28. September 2012 10:18:18 Rogier Wolff wrote:
> > > For the TX queue, we don't do buffering in libftdi.
> > > So it just sends the purge request to the chip.
> >
> > Ah! Good. :-)
> >
> > Last I looked at the code there was a 4k buffer in the library. Might
> > have been a different library. Might have been older version. I don't
> > know.
>
> That's probably the read buffer of libftdi. Default size is 4k.
Nah. I don't think so.
[code]
int ftdi_init(struct ftdi_context *ftdi)
...
ftdi->writebuffer_chunksize = 4096;
[/code]
this is in "ftdi.c" in a directory with a name that has "libftdi" and
"0.19" in it (to give an indication of "when I last looked at the
code").
Ah! Now I understand. Rereading the ftdi_write_data function
carefully, the data is not copied into a buffer of that size, but the
data is chomped into chunks of max that size. It has nothing to do
with buffering. The term "buffer" in ftdi->writebuffer_chunksize is
misplaced. It should be named: ftdi->write_chunksize .
Roger.
--
** R.E.Wolff@xxxxxxxxxxxx ** http://www.BitWizard.nl/ ** +31-15-2600998 **
** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|