Quantcast

read buffer question

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

read buffer question

Phillip Vallejo

Hi,

Is there a way to read how many bytes are sitting in the FTDI read buffer without actually reading the bytes out? A read buffer count?

I see the protected member FTDI_Context.readbuffer_remaining but that value is only valid after the first byte has been read, ie, ‘remaining’.

Thanks for any help,

-Phillip Vallejo

 

 

 


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: read buffer question

Thomas Jarosch
Am 19.05.2016 um 01:34 schrieb Phillip Vallejo:
> Is there a way to read how many bytes are sitting in the FTDI read
> buffer without actually reading the bytes out? A read buffer count?
>
> I see the protected member FTDI_Context.readbuffer_remaining but that
> value is only valid after the first byte has been read, ie, ‘remaining’.

as far as I know there's no USB command the read out how many
bytes are still in the internal buffer of the chip.

The D2XX library uses a background thread to constantly read
all available data into a memory buffer on the host. That's
the reason it can tell you how many bytes are in the buffer ;)
At least that's my current knowledge about it.

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: read buffer question

Phillip Vallejo
Ok, thanks.

-----Original Message-----
From: Thomas Jarosch [mailto:[hidden email]]
Sent: Thursday, May 19, 2016 1:44 PM
To: [hidden email]
Subject: Re: read buffer question

Am 19.05.2016 um 01:34 schrieb Phillip Vallejo:
> Is there a way to read how many bytes are sitting in the FTDI read
> buffer without actually reading the bytes out? A read buffer count?
>
> I see the protected member FTDI_Context.readbuffer_remaining but that
> value is only valid after the first byte has been read, ie, ‘remaining’.

as far as I know there's no USB command the read out how many bytes are still in the internal buffer of the chip.

The D2XX library uses a background thread to constantly read all available data into a memory buffer on the host. That's the reason it can tell you how many bytes are in the buffer ;) At least that's my current knowledge about it.

Thomas


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



--
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: read buffer question

E.S. Rosenberg
In reply to this post by Thomas Jarosch


2016-05-19 23:44 GMT+03:00 Thomas Jarosch <[hidden email]>:
Am 19.05.2016 um 01:34 schrieb Phillip Vallejo:
> Is there a way to read how many bytes are sitting in the FTDI read
> buffer without actually reading the bytes out? A read buffer count?
>
> I see the protected member FTDI_Context.readbuffer_remaining but that
> value is only valid after the first byte has been read, ie, ‘remaining’.

as far as I know there's no USB command the read out how many
bytes are still in the internal buffer of the chip.

The D2XX library uses a background thread to constantly read
all available data into a memory buffer on the host. That's
the reason it can tell you how many bytes are in the buffer ;)
At least that's my current knowledge about it.
OT: Has this thread ever been implemented with libftdi? Is this how the kernel driver works?
I remember that I was unable to get a proper read of DMX (RDM, phy RS485) data through libfti when I was expanding the OpenLIghtingArchitecture libftdi driver a year or so ago, am hoping to have another crack at it somewhere in the not to far away future...

Regards,
Eli

Thomas


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




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


Loading...